Browse Source

configure COOKIE_SECURE and ALLOWED_HOSTS options

pull/342/head
Guillaume Vincent 8 years ago
parent
commit
891f28d8f9
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      lesspass/settings.py

+ 4
- 2
lesspass/settings.py View File

@@ -16,9 +16,9 @@ def get_secret_key(secret_key):


SECRET_KEY = env('SECRET_KEY', preprocessor=get_secret_key, default=None) SECRET_KEY = env('SECRET_KEY', preprocessor=get_secret_key, default=None)


DEBUG = env.bool('DJANGO_DEBUG', default=True)
DEBUG = env.bool('DJANGO_DEBUG', default=False)


ALLOWED_HOSTS = []
ALLOWED_HOSTS = env('ALLOWED_HOSTS', cast=list, default=['localhost', '127.0.0.1', '.lesspass.com'])


ADMIN = [('Guillaume Vincent', 'guillaume@oslab.fr'), ] ADMIN = [('Guillaume Vincent', 'guillaume@oslab.fr'), ]


@@ -177,3 +177,5 @@ DJOSER = {
} }


SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True

Loading…
Cancel
Save