forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2022-01-24 21:40:58 +02:00
parent cbdb41c295
commit 15cc5c612e
5 changed files with 8 additions and 8 deletions

View File

@ -27,7 +27,7 @@ CF_HEADERS = {"Authorization": f"Bearer {CF_KEY}", "Content-Type": "application/
@auth_desired
def post_pid_comment_cid(cid, pid=None, anything=None, v=None):
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"{SITE_FULL}/logged_out{request.full_path}")
if v and request.path.startswith('/logged_out'): v = None

View File

@ -136,7 +136,7 @@ def notifications(v):
def front_all(v):
if not v and request.path == "/" and not request.headers.get("Authorization"):
return redirect(f"/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

View File

@ -98,7 +98,7 @@ def submit_get(v):
@auth_desired
def post_id(pid, anything=None, v=None):
if not v and not request.path.startswith('/logged_out') and not request.headers.get("Authorization"):
return redirect(f"/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

View File

@ -31,7 +31,7 @@ def marsey_list():
@app.get("/logged_out/terms")
@auth_desired
def terms(v):
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"{SITE_FULL}/logged_out{request.full_path}")
if v and request.path.startswith('/logged_out'): v = None
return render_template("terms.html", v=v)
@ -40,7 +40,7 @@ def terms(v):
@app.get('/logged_out/sidebar')
@auth_desired
def sidebar(v):
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"{SITE_FULL}/logged_out{request.full_path}")
if v and request.path.startswith('/logged_out'): v = None
return render_template('sidebar.html', v=v)

View File

@ -647,7 +647,7 @@ def visitors(v):
def u_username(username, v=None):
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"{SITE_FULL}/logged_out{request.full_path}")
if v and request.path.startswith('/logged_out'): v = None
@ -754,7 +754,7 @@ def u_username(username, v=None):
def u_username_comments(username, v=None):
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"{SITE_FULL}/logged_out{request.full_path}")
if v and request.path.startswith('/logged_out'): v = None
@ -929,7 +929,7 @@ def remove_follow(username, v):
@limiter.exempt
@auth_desired
def user_profile_uid(v, id):
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"{SITE_FULL}/logged_out{request.full_path}")
if v and request.path.startswith('/logged_out'): v = None
try: id = int(id)