mirror of
https://github.com/ansible/awx.git
synced 2026-03-11 22:49:32 -02:30
Make session and csrf cookies secure by default
This commit is contained in:
@@ -163,6 +163,12 @@ MAX_EVENT_RES_DATA = 700000
|
|||||||
# Note: This setting may be overridden by database settings.
|
# Note: This setting may be overridden by database settings.
|
||||||
EVENT_STDOUT_MAX_BYTES_DISPLAY = 1024
|
EVENT_STDOUT_MAX_BYTES_DISPLAY = 1024
|
||||||
|
|
||||||
|
# Disallow sending session cookies over insecure connections
|
||||||
|
SESSION_COOKIE_SECURE = True
|
||||||
|
|
||||||
|
# Disallow sending csrf cookies over insecure connections
|
||||||
|
CSRF_COOKIE_SECURE = True
|
||||||
|
|
||||||
TEMPLATE_CONTEXT_PROCESSORS = ( # NOQA
|
TEMPLATE_CONTEXT_PROCESSORS = ( # NOQA
|
||||||
'django.contrib.auth.context_processors.auth',
|
'django.contrib.auth.context_processors.auth',
|
||||||
'django.core.context_processors.debug',
|
'django.core.context_processors.debug',
|
||||||
|
|||||||
@@ -24,11 +24,11 @@ ALLOWED_HOSTS = ['*']
|
|||||||
mimetypes.add_type("image/svg+xml", ".svg", True)
|
mimetypes.add_type("image/svg+xml", ".svg", True)
|
||||||
mimetypes.add_type("image/svg+xml", ".svgz", True)
|
mimetypes.add_type("image/svg+xml", ".svgz", True)
|
||||||
|
|
||||||
MONGO_HOST = '127.0.0.1'
|
# Disallow sending session cookies over insecure connections
|
||||||
MONGO_PORT = 27017
|
SESSION_COOKIE_SECURE = False
|
||||||
MONGO_USERNAME = None
|
|
||||||
MONGO_PASSWORD = None
|
# Disallow sending csrf cookies over insecure connections
|
||||||
MONGO_DB = 'system_tracking_dev'
|
CSRF_COOKIE_SECURE = False
|
||||||
|
|
||||||
# Override django.template.loaders.cached.Loader in defaults.py
|
# Override django.template.loaders.cached.Loader in defaults.py
|
||||||
TEMPLATE_LOADERS = (
|
TEMPLATE_LOADERS = (
|
||||||
|
|||||||
Reference in New Issue
Block a user