diff --git a/.env.template b/.env.template index bd0c6c52..c37bf68a 100644 --- a/.env.template +++ b/.env.template @@ -111,4 +111,9 @@ REVERSE_PROXY_AUTH=0 # SOCIAL_DEFAULT_ACCESS = 1 # if SOCIAL_DEFAULT_ACCESS is used, which group should be added -# SOCIAL_DEFAULT_GROUP=guest \ No newline at end of file +# SOCIAL_DEFAULT_GROUP=guest + +# Django session cookie settings. Can be changed to allow a single django application to authenticate several applications +# when running under the same database +# SESSION_COOKIE_DOMAIN=.example.com +# SESSION_COOKIE_NAME=sessionid # use this only to not interfere with non unified django applications under the same top level domain \ No newline at end of file diff --git a/recipes/settings.py b/recipes/settings.py index 6e595789..ec5c9556 100644 --- a/recipes/settings.py +++ b/recipes/settings.py @@ -126,6 +126,9 @@ ACCOUNT_LOGOUT_ON_GET = True SOCIALACCOUNT_PROVIDERS = ast.literal_eval( os.getenv('SOCIALACCOUNT_PROVIDERS') if os.getenv('SOCIALACCOUNT_PROVIDERS') else '{}') +SESSION_COOKIE_DOMAIN = os.getenv('SESSION_COOKIE_DOMAIN', None) +SESSION_COOKIE_NAME = os.getenv('SESSION_COOKIE_DOMAIN', 'sessionid') + ENABLE_SIGNUP = bool(int(os.getenv('ENABLE_SIGNUP', False))) ENABLE_METRICS = bool(int(os.getenv('ENABLE_METRICS', False)))