forked from rDrama/rDrama
sfd
parent
666870e0a3
commit
1a2869e256
|
@ -169,6 +169,9 @@ def notifications(v):
|
||||||
@auth_desired
|
@auth_desired
|
||||||
def front_all(v, sub=None, subdomain=None):
|
def front_all(v, sub=None, subdomain=None):
|
||||||
|
|
||||||
|
if g.webview and not session.get("session_id"):
|
||||||
|
session["session_id"] = secrets.token_hex(49)
|
||||||
|
|
||||||
if not v and not request.path.startswith('/logged_out'): return redirect(f"/logged_out{request.full_path}")
|
if not v and not request.path.startswith('/logged_out'): return redirect(f"/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
|
||||||
|
|
||||||
|
@ -176,9 +179,6 @@ def front_all(v, sub=None, subdomain=None):
|
||||||
|
|
||||||
if (request.path.startswith('/h/') or request.path.startswith('/s/')) and not sub: abort(404)
|
if (request.path.startswith('/h/') or request.path.startswith('/s/')) and not sub: abort(404)
|
||||||
|
|
||||||
if g.webview and not session.get("session_id"):
|
|
||||||
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…
Reference in New Issue