Fix missing production security middleware
This commit is contained in:
parent
cff1cdd8ec
commit
fd3ce87251
1 changed files with 7 additions and 0 deletions
|
@ -23,6 +23,13 @@ SECRET_KEY = env("DJANGO_SECRET_KEY")
|
||||||
# properly on Heroku.
|
# properly on Heroku.
|
||||||
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
||||||
|
|
||||||
|
# django-secure
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
INSTALLED_APPS += ("djangosecure", )
|
||||||
|
|
||||||
|
SECURITY_MIDDLEWARE = (
|
||||||
|
'djangosecure.middleware.SecurityMiddleware',
|
||||||
|
)
|
||||||
|
|
||||||
# Make sure djangosecure.middleware.SecurityMiddleware is listed first
|
# Make sure djangosecure.middleware.SecurityMiddleware is listed first
|
||||||
MIDDLEWARE_CLASSES = SECURITY_MIDDLEWARE + MIDDLEWARE_CLASSES
|
MIDDLEWARE_CLASSES = SECURITY_MIDDLEWARE + MIDDLEWARE_CLASSES
|
||||||
|
|
Loading…
Add table
Reference in a new issue