This commit is contained in:
Aevann1 2022-03-09 04:04:37 +02:00
parent febf7c98fb
commit 05ed7a2a05
26 changed files with 124 additions and 126 deletions

View file

@ -133,14 +133,14 @@ def notifications(v):
@app.get("/")
@app.get("/logged_out")
@app.get("/s/<sub>")
@app.get("/logged_out/s/<sub>")
@app.get("/h/<sub>")
@app.get("/logged_out/h/<sub>")
@limiter.limit("3/second;30/minute;1000/hour;5000/day")
@auth_desired
def front_all(v, sub=None, subdomain=None):
if sub: sub = g.db.query(Sub).filter_by(name=sub.strip().lower()).one_or_none()
if request.path.startswith('/s/') and not sub: abort(404)
if request.path.startswith('/h/') and not sub: abort(404)
if g.webview and not session.get("session_id"):
session.permanent = True