From 3c04afa31f6f9d5d35b0e7739cadc47d39303b5f Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 20 Feb 2020 17:08:11 +0100 Subject: [PATCH] root: use different cookie names for dev instance --- passbook/root/settings.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/passbook/root/settings.py b/passbook/root/settings.py index a1df40b1d..34735dcc2 100644 --- a/passbook/root/settings.py +++ b/passbook/root/settings.py @@ -49,10 +49,15 @@ LOGIN_URL = "passbook_core:auth-login" # Custom user model AUTH_USER_MODEL = "passbook_core.User" -CSRF_COOKIE_NAME = "passbook_csrf" -SESSION_COOKIE_NAME = "passbook_session" +if DEBUG: + CSRF_COOKIE_NAME = "passbook_csrf_debug" + LANGUAGE_COOKIE_NAME = "passbook_language_debug" + SESSION_COOKIE_NAME = "passbook_session_debug" +else: + CSRF_COOKIE_NAME = "passbook_csrf" + LANGUAGE_COOKIE_NAME = "passbook_language" + SESSION_COOKIE_NAME = "passbook_session" SESSION_COOKIE_DOMAIN = CONFIG.y("domain", None) -LANGUAGE_COOKIE_NAME = "passbook_language" AUTHENTICATION_BACKENDS = [ "django.contrib.auth.backends.ModelBackend",