Only apply Django security settings in production
This commit is contained in:
parent
743a4f678a
commit
3e21ee85d0
1 changed files with 15 additions and 14 deletions
|
@ -609,6 +609,7 @@ ACCOUNT_LOGIN_REDIRECT_URL = '/dashboard/'
|
||||||
|
|
||||||
ADMINS = [('', email) for email in os.environ.get('DJANGO_ADMINS', '').split(',') if email]
|
ADMINS = [('', email) for email in os.environ.get('DJANGO_ADMINS', '').split(',') if email]
|
||||||
|
|
||||||
|
if not DEBUG:
|
||||||
# Django recommended security settings.
|
# Django recommended security settings.
|
||||||
SECURE_CONTENT_TYPE_NOSNIFF = True
|
SECURE_CONTENT_TYPE_NOSNIFF = True
|
||||||
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTOCOL', 'https')
|
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTOCOL', 'https')
|
||||||
|
|
Loading…
Reference in a new issue