don't explicitly set cookies for localhost

master
justcool393 2022-11-15 16:22:43 -06:00
parent e1634d0940
commit 57b4d586ad
1 changed files with 2 additions and 1 deletions

View File

@ -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