Fix missing production security middleware

This commit is contained in:
Matthew Ryan Dillon 2016-01-29 09:28:13 -07:00
parent cff1cdd8ec
commit fd3ce87251

View file

@ -23,6 +23,13 @@ SECRET_KEY = env("DJANGO_SECRET_KEY")
# properly on Heroku.
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
MIDDLEWARE_CLASSES = SECURITY_MIDDLEWARE + MIDDLEWARE_CLASSES