Commit e8259b82 by Xavier Antoviaque

secure-cookies: Allow to use secure HTTPS cookies (Django setting)

Cf https://docs.djangoproject.com/en/1.4/ref/settings/#std:setting-SESSION_COOKIE_SECURE
parent 7b3bacaa
...@@ -133,6 +133,7 @@ if 'loc_cache' not in CACHES: ...@@ -133,6 +133,7 @@ if 'loc_cache' not in CACHES:
SESSION_COOKIE_DOMAIN = ENV_TOKENS.get('SESSION_COOKIE_DOMAIN') SESSION_COOKIE_DOMAIN = ENV_TOKENS.get('SESSION_COOKIE_DOMAIN')
SESSION_ENGINE = ENV_TOKENS.get('SESSION_ENGINE', SESSION_ENGINE) SESSION_ENGINE = ENV_TOKENS.get('SESSION_ENGINE', SESSION_ENGINE)
SESSION_COOKIE_SECURE = ENV_TOKENS.get('SESSION_COOKIE_SECURE', SESSION_COOKIE_SECURE)
# allow for environments to specify what cookie name our login subsystem should use # allow for environments to specify what cookie name our login subsystem should use
# this is to fix a bug regarding simultaneous logins between edx.org and edge.edx.org which can # this is to fix a bug regarding simultaneous logins between edx.org and edge.edx.org which can
......
...@@ -268,6 +268,7 @@ MODULESTORE_BRANCH = 'draft-preferred' ...@@ -268,6 +268,7 @@ MODULESTORE_BRANCH = 'draft-preferred'
# Change DEBUG/TEMPLATE_DEBUG in your environment settings files, not here # Change DEBUG/TEMPLATE_DEBUG in your environment settings files, not here
DEBUG = False DEBUG = False
TEMPLATE_DEBUG = False TEMPLATE_DEBUG = False
SESSION_COOKIE_SECURE = False
# Site info # Site info
SITE_ID = 1 SITE_ID = 1
......
...@@ -141,6 +141,7 @@ HTTPS = ENV_TOKENS.get('HTTPS', HTTPS) ...@@ -141,6 +141,7 @@ HTTPS = ENV_TOKENS.get('HTTPS', HTTPS)
SESSION_ENGINE = ENV_TOKENS.get('SESSION_ENGINE', SESSION_ENGINE) SESSION_ENGINE = ENV_TOKENS.get('SESSION_ENGINE', SESSION_ENGINE)
SESSION_COOKIE_DOMAIN = ENV_TOKENS.get('SESSION_COOKIE_DOMAIN') SESSION_COOKIE_DOMAIN = ENV_TOKENS.get('SESSION_COOKIE_DOMAIN')
REGISTRATION_EXTRA_FIELDS = ENV_TOKENS.get('REGISTRATION_EXTRA_FIELDS', REGISTRATION_EXTRA_FIELDS) REGISTRATION_EXTRA_FIELDS = ENV_TOKENS.get('REGISTRATION_EXTRA_FIELDS', REGISTRATION_EXTRA_FIELDS)
SESSION_COOKIE_SECURE = ENV_TOKENS.get('SESSION_COOKIE_SECURE', SESSION_COOKIE_SECURE)
CMS_BASE = ENV_TOKENS.get('CMS_BASE', 'studio.edx.org') CMS_BASE = ENV_TOKENS.get('CMS_BASE', 'studio.edx.org')
......
...@@ -559,6 +559,7 @@ COURSES_WITH_UNSAFE_CODE = [] ...@@ -559,6 +559,7 @@ COURSES_WITH_UNSAFE_CODE = []
DEBUG = False DEBUG = False
TEMPLATE_DEBUG = False TEMPLATE_DEBUG = False
USE_TZ = True USE_TZ = True
SESSION_COOKIE_SECURE = False
# CMS base # CMS base
CMS_BASE = 'localhost:8001' CMS_BASE = 'localhost:8001'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment