mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-07-16 02:52:25 +03:00
fixing production settings logic for middleware
This commit is contained in:
parent
7403679ee7
commit
69398a8292
|
@ -45,11 +45,12 @@ SECURITY_MIDDLEWARE = (
|
||||||
RAVEN_MIDDLEWARE = ('raven.contrib.django.raven_compat.middleware.Sentry404CatchMiddleware',
|
RAVEN_MIDDLEWARE = ('raven.contrib.django.raven_compat.middleware.Sentry404CatchMiddleware',
|
||||||
'raven.contrib.django.raven_compat.middleware.SentryResponseErrorIdMiddleware',)
|
'raven.contrib.django.raven_compat.middleware.SentryResponseErrorIdMiddleware',)
|
||||||
MIDDLEWARE_CLASSES = SECURITY_MIDDLEWARE + RAVEN_MIDDLEWARE + MIDDLEWARE_CLASSES
|
MIDDLEWARE_CLASSES = SECURITY_MIDDLEWARE + RAVEN_MIDDLEWARE + MIDDLEWARE_CLASSES
|
||||||
{%- endif %}
|
{% else %}
|
||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
# set this to 60 seconds and then to 518400 when you can prove it works
|
# set this to 60 seconds and then to 518400 when you can prove it works
|
||||||
SECURE_HSTS_SECONDS = 60
|
SECURE_HSTS_SECONDS = 60
|
||||||
|
|
Loading…
Reference in New Issue
Block a user