diff --git a/{{cookiecutter.repo_name}}/config/settings/production.py b/{{cookiecutter.repo_name}}/config/settings/production.py index ce5db9e5d..2261b9a5c 100644 --- a/{{cookiecutter.repo_name}}/config/settings/production.py +++ b/{{cookiecutter.repo_name}}/config/settings/production.py @@ -45,11 +45,12 @@ SECURITY_MIDDLEWARE = ( RAVEN_MIDDLEWARE = ('raven.contrib.django.raven_compat.middleware.Sentry404CatchMiddleware', 'raven.contrib.django.raven_compat.middleware.SentryResponseErrorIdMiddleware',) MIDDLEWARE_CLASSES = SECURITY_MIDDLEWARE + RAVEN_MIDDLEWARE + MIDDLEWARE_CLASSES -{%- endif %} +{% else %} # Make sure djangosecure.middleware.SecurityMiddleware is listed first MIDDLEWARE_CLASSES = SECURITY_MIDDLEWARE + MIDDLEWARE_CLASSES +{%- endif %} # set this to 60 seconds and then to 518400 when you can prove it works SECURE_HSTS_SECONDS = 60