From 57b4d586ade531dcf403a6c1d8994bf2b5e1b33e Mon Sep 17 00:00:00 2001 From: justcool393 Date: Tue, 15 Nov 2022 16:22:43 -0600 Subject: [PATCH] don't explicitly set cookies for localhost --- files/__main__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/__main__.py b/files/__main__.py index 3e4ccd423..56173d14e 100644 --- a/files/__main__.py +++ b/files/__main__.py @@ -31,7 +31,8 @@ is_localhost = SITE == "localhost" app.config['SERVER_NAME'] = SITE app.config['SECRET_KEY'] = environ.get('SECRET_KEY').strip() app.config['SEND_FILE_MAX_AGE_DEFAULT'] = 3153600 -app.config['SESSION_COOKIE_DOMAIN'] = f'.{SITE}' if not is_localhost else SITE +if not is_localhost: + app.config['SESSION_COOKIE_DOMAIN'] = f'.{SITE}' app.config["SESSION_COOKIE_NAME"] = "session_" + environ.get("SITE_NAME").strip().lower() app.config['MAX_CONTENT_LENGTH'] = 100 * 1024 * 1024 app.config["SESSION_COOKIE_SECURE"] = True