mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
Enable django SecurityMiddleware, mitigates issue #1111.
Signed-off-by: Johannes Keyser <johanneskeyser@posteo.de> Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
This commit is contained in:
parent
6b1c78c3b0
commit
5fb68b459c
@ -262,6 +262,7 @@ def configure_django():
|
|||||||
LOGIN_REDIRECT_URL='index',
|
LOGIN_REDIRECT_URL='index',
|
||||||
MESSAGE_TAGS={message_constants.ERROR: 'danger'},
|
MESSAGE_TAGS={message_constants.ERROR: 'danger'},
|
||||||
MIDDLEWARE_CLASSES=(
|
MIDDLEWARE_CLASSES=(
|
||||||
|
'django.middleware.security.SecurityMiddleware',
|
||||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||||
'django.middleware.locale.LocaleMiddleware',
|
'django.middleware.locale.LocaleMiddleware',
|
||||||
'django.middleware.common.CommonMiddleware',
|
'django.middleware.common.CommonMiddleware',
|
||||||
@ -276,6 +277,8 @@ def configure_django():
|
|||||||
'plinth.middleware.SetupMiddleware',
|
'plinth.middleware.SetupMiddleware',
|
||||||
),
|
),
|
||||||
ROOT_URLCONF='plinth.urls',
|
ROOT_URLCONF='plinth.urls',
|
||||||
|
SECURE_BROWSER_XSS_FILTER=True,
|
||||||
|
SECURE_CONTENT_TYPE_NOSNIFF=True,
|
||||||
SECURE_PROXY_SSL_HEADER=secure_proxy_ssl_header,
|
SECURE_PROXY_SSL_HEADER=secure_proxy_ssl_header,
|
||||||
SESSION_ENGINE='django.contrib.sessions.backends.file',
|
SESSION_ENGINE='django.contrib.sessions.backends.file',
|
||||||
SESSION_FILE_PATH=sessions_directory,
|
SESSION_FILE_PATH=sessions_directory,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user