remotes/1693045480750635534/spooky-22
Aevann1 2021-12-28 09:05:48 +02:00
parent 6ca2113d68
commit 14525995be
1 changed files with 7 additions and 2 deletions

View File

@ -130,8 +130,13 @@ def front_all(v):
if not session.get("session_id"): session["session_id"] = secrets.token_hex(49)
if not v and not request.headers.get("Authorization"):
if g.system == "mobile" and '/mobile' not in request.path: return redirect(f"/logged_out/mobile{request.full_path.replace('/logged_out','')}")
elif g.system == "desktop" and "/logged_out" not in request.path: return redirect(f"/logged_out{request.full_path.replace('/mobile','')}")
if request.path.startswith('/logged_out/mobile'):
if g.system == "desktop": return redirect(f"/logged_out{request.full_path.replace('/mobile','')}")
elif request.path.startswith('/logged_out'):
if g.system == "mobile": return redirect(f"/logged_out/mobile{request.full_path.replace('/logged_out','')}")
else:
if g.system == "desktop": return redirect(f"/logged_out{request.full_path}")
else: return redirect(f"/logged_out/mobile{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