dfs
This commit is contained in:
parent
e6a4026017
commit
f4953f53aa
1 changed files with 4 additions and 1 deletions
|
@ -122,13 +122,16 @@ def notifications(v):
|
||||||
|
|
||||||
@app.get("/")
|
@app.get("/")
|
||||||
@app.get("/logged_out")
|
@app.get("/logged_out")
|
||||||
|
@app.get("/logged_out/mobile")
|
||||||
@auth_desired
|
@auth_desired
|
||||||
def front_all(v):
|
def front_all(v):
|
||||||
|
|
||||||
session.permanent = True
|
session.permanent = True
|
||||||
if not session.get("session_id"): session["session_id"] = secrets.token_hex(49)
|
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 not v and request.path == "/" and not request.headers.get("Authorization"):
|
||||||
|
if g.system == "mobile": return redirect(f"/logged_out/mobile{request.full_path}")
|
||||||
|
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
|
if v and v.is_banned and not v.unban_utc: return render_template('errors/500.html', error=True, v=v), 500
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue