cx
This commit is contained in:
parent
6fa4bd4281
commit
fccd2e8c05
1 changed files with 4 additions and 4 deletions
|
@ -135,15 +135,15 @@ def notifications(v):
|
||||||
@auth_desired
|
@auth_desired
|
||||||
def front_all(v):
|
def front_all(v):
|
||||||
|
|
||||||
|
if not session.get("session_id"):
|
||||||
|
session.permanent = True
|
||||||
|
session["session_id"] = secrets.token_hex(49)
|
||||||
|
|
||||||
if not v and request.path == "/" and not request.headers.get("Authorization"):
|
if not v and request.path == "/" and not request.headers.get("Authorization"):
|
||||||
return redirect(f"{SITE_FULL}/logged_out{request.full_path}")
|
return redirect(f"{SITE_FULL}/logged_out{request.full_path}")
|
||||||
|
|
||||||
if v and request.path.startswith('/logged_out'): v = None
|
if v and request.path.startswith('/logged_out'): v = None
|
||||||
|
|
||||||
if not session.get("session_id"):
|
|
||||||
session.permanent = True
|
|
||||||
session["session_id"] = secrets.token_hex(49)
|
|
||||||
|
|
||||||
try: page = max(int(request.values.get("page", 1)), 1)
|
try: page = max(int(request.values.get("page", 1)), 1)
|
||||||
except: abort(400)
|
except: abort(400)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue