@@ -181,6 +181,10 @@
# The cookie containing the users' session ID will expire after this amount of time in seconds.
## ttl=60*60*24*14
+ # The cookie containing the users' session ID will be secure.
+ # Should only be enabled with HTTPS.
+ ## secure=false
+
# Configuration options for connecting to an external SMTP server
# ------------------------------------------------------------------------
@@ -187,6 +187,10 @@
[[smtp]]
@@ -221,6 +221,12 @@ SESSION = ConfigSection(
help=_("The cookie containing the users' session ID will expire after this amount of time in seconds."),
type=int,
default=60*60*24*14,
+ ),
+ SECURE=Config(
+ key='secure',
+ help=_("The cookie containing the users' session ID will be secure. This should only be enabled with HTTPS."),
+ type=coerce_bool,
+ default=False,
)
@@ -251,6 +251,7 @@ DATABASES = {
# Configure sessions
SESSION_COOKIE_AGE = desktop.conf.SESSION.TTL.get()
+SESSION_COOKIE_SECURE = desktop.conf.SESSION.SECURE.get()
# django-nose test specifics
TEST_RUNNER = 'desktop.lib.test_runners.HueTestRunner'