sfd
This commit is contained in:
parent
de814e7581
commit
8c1ac90b10
1 changed files with 6 additions and 3 deletions
|
@ -17,7 +17,9 @@ def login_get(v):
|
||||||
redir = redir.replace("/logged_out", "").strip()
|
redir = redir.replace("/logged_out", "").strip()
|
||||||
if not redir.startswith(SITE_FULL) and not redir.startswith('/'): redir = None
|
if not redir.startswith(SITE_FULL) and not redir.startswith('/'): redir = None
|
||||||
|
|
||||||
if v and redir: return redirect(redir)
|
if v and redir:
|
||||||
|
if redir.startswith(SITE_FULL): return redirect(redir)
|
||||||
|
elif redir.startswith('/'): return redirect(f'{SITE_FULL}{redir}')
|
||||||
|
|
||||||
return render_template("login.html", failed=False, redirect=redir)
|
return render_template("login.html", failed=False, redirect=redir)
|
||||||
|
|
||||||
|
@ -145,8 +147,9 @@ def login_post():
|
||||||
redir = redir.replace("/logged_out", "").strip()
|
redir = redir.replace("/logged_out", "").strip()
|
||||||
if not redir.startswith(SITE_FULL) and not redir.startswith('/'): redir = '/'
|
if not redir.startswith(SITE_FULL) and not redir.startswith('/'): redir = '/'
|
||||||
|
|
||||||
return redirect(redir)
|
if redir.startswith(SITE_FULL): return redirect(redir)
|
||||||
|
if redir.startswith('/'): return redirect(f'{SITE_FULL}{redir}')
|
||||||
|
return redirect(f'{SITE_FULL}/')
|
||||||
|
|
||||||
@app.get("/me")
|
@app.get("/me")
|
||||||
@app.get("/@me")
|
@app.get("/@me")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue