diff --git a/files/routes/comments.py b/files/routes/comments.py index b27431c773..fe54fefefc 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -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 diff --git a/files/routes/front.py b/files/routes/front.py index 67917e87b6..856ce55808 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -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 diff --git a/files/routes/posts.py b/files/routes/posts.py index a7d5c6730f..beb39fb8e4 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -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 diff --git a/files/routes/static.py b/files/routes/static.py index 36715d0120..e7cd768af5 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -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) diff --git a/files/routes/users.py b/files/routes/users.py index 8b2529d884..1a38b97c1f 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -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)