Set the 'secure' flag on Django cookies

(imported from commit b563f62e2b185a8195daf212574c30f6e252900e)
This commit is contained in:
Keegan McAllister 2012-10-17 16:35:35 -04:00
parent 716badc2c6
commit 8070680184
1 changed files with 8 additions and 0 deletions

View File

@ -76,6 +76,14 @@ SECRET_KEY = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
# username generation.
HASH_SALT = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
# Tell the browser to never send our cookies without encryption, e.g.
# when executing the initial http -> https redirect.
#
# Turn it off for local testing because we don't have SSL.
if deployed:
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',