diff --git a/routers/root.py b/routers/root.py index 06398d3b6..5688f8807 100644 --- a/routers/root.py +++ b/routers/root.py @@ -772,7 +772,8 @@ def page_wrapper(request: Request, className=""): def anonymous_login_container(request: Request, context: dict): - login_url = str(furl("/login/", query_params=dict(next=request.url.path))) + next_url = str(furl(request.url).set(origin=None)) + login_url = str(furl("/login/", query_params=dict(next=next_url))) with gui.tag("a", href=login_url, className="pe-2 d-none d-lg-block"): gui.html("Sign In")