forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2021-12-28 08:53:06 +02:00
parent 038b685eb3
commit d8414ba117
1 changed files with 3 additions and 3 deletions

View File

@ -129,9 +129,9 @@ 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"):
if g.system == "mobile": return redirect(f"/logged_out/mobile{request.full_path}")
return redirect(f"/logged_out{request.full_path}")
if not v and not request.headers.get("Authorization"):
if g.system == "mobile" and request.path != "/logged_out/mobile/": return redirect(f"/logged_out/mobile{request.full_path.replace('logged_out/','')}")
elif g.system == "desktop" and request.path != "/logged_out/": 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