remotes/1693045480750635534/spooky-22
Aevann1 2021-12-24 03:30:48 +02:00
parent 970d53b978
commit 0374e663af
2 changed files with 3 additions and 1 deletions

View File

@ -38,7 +38,6 @@ app.config['MAX_CONTENT_LENGTH'] = 8 * 1024 * 1024
app.config["SESSION_COOKIE_SECURE"] = True
app.config["SESSION_COOKIE_SAMESITE"] = "Lax"
app.config["PERMANENT_SESSION_LIFETIME"] = 60 * 60 * 24 * 365
app.config["SESSION_REFRESH_EACH_REQUEST"] = True
app.config["SLOGAN"] = environ.get("SLOGAN", "").strip()
app.config["DEFAULT_COLOR"] = environ.get("DEFAULT_COLOR", "ff0000").strip()
app.config["DEFAULT_THEME"] = environ.get("DEFAULT_THEME", "midnight").strip()

View File

@ -125,6 +125,9 @@ def notifications(v):
@auth_desired
def front_all(v):
session.permanent = True
if not session.get("session_id"): session["session_id"] = secrets.token_hex(49)
if not v and request.path == "/" and not request.headers.get("Authorization"): return redirect(f"/logged_out{request.full_path}")
if v and v.is_banned and not v.unban_utc: return render_template('errors/500.html', error=True, v=v), 500