From 0d359e9e579cef7661fb55bf5389fac4abfd9330 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sun, 4 Aug 2024 15:52:19 +0200 Subject: [PATCH] Add cookie prefix environment variable to config --- cps/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cps/__init__.py b/cps/__init__.py index 157dd14e..5ecc00eb 100644 --- a/cps/__init__.py +++ b/cps/__init__.py @@ -85,7 +85,9 @@ app.config.update( SESSION_COOKIE_HTTPONLY=True, SESSION_COOKIE_SAMESITE='Strict', REMEMBER_COOKIE_SAMESITE='Strict', # will be available in flask-login 0.5.1 earliest - WTF_CSRF_SSL_STRICT=False + WTF_CSRF_SSL_STRICT=False, + SESSION_COOKIE_NAME=os.environ.get('COOKIE_PREFIX', "") + "session", + REMEMBER_COOKIE_NAME=os.environ.get('COOKIE_PREFIX', "") + "remember_token" ) lm = MyLoginManager()