From 5bdc60006d9f2419480acee52a40d86d0cd4dd1c Mon Sep 17 00:00:00 2001 From: JOJO <1498581755@qq.com> Date: Sun, 31 May 2026 11:40:44 +0800 Subject: [PATCH] fix(auth): allow custom session cookie name --- server/app_legacy.py | 1 + 1 file changed, 1 insertion(+) diff --git a/server/app_legacy.py b/server/app_legacy.py index 1e25390..fcf8d76 100644 --- a/server/app_legacy.py +++ b/server/app_legacy.py @@ -254,6 +254,7 @@ if not _secret_key: app.config['SECRET_KEY'] = _secret_key app.config['PERMANENT_SESSION_LIFETIME'] = timedelta(hours=12) _cookie_secure_env = (os.environ.get("WEB_COOKIE_SECURE") or "").strip().lower() +app.config['SESSION_COOKIE_NAME'] = os.environ.get("WEB_SESSION_COOKIE_NAME", "session") app.config['SESSION_COOKIE_SAMESITE'] = os.environ.get("WEB_COOKIE_SAMESITE", "Strict") app.config['SESSION_COOKIE_SECURE'] = _cookie_secure_env in {"1", "true", "yes"} app.config['SESSION_COOKIE_HTTPONLY'] = True