fix issue with logged-in redirection for holes

master
Aevann1 2022-08-06 00:39:38 +02:00
parent cfa4841ffe
commit f27a65f2dc
1 changed files with 3 additions and 1 deletions

View File

@ -26,7 +26,9 @@ def front_all(v, sub=None, subdomain=None):
return redirect('https://deuxrama.net')
if v and request.path.startswith('/logged_out'):
return redirect(request.full_path.replace('/logged_out','/'))
redir = request.full_path.replace('/logged_out','')
if not redir.startswith('/'): redir = f'/{redir}'
return redirect(redir)
if sub: sub = g.db.query(Sub).filter_by(name=sub.strip().lower()).one_or_none()