This commit is contained in:
Aevann1 2022-01-09 23:06:21 +02:00
parent 094a1537fe
commit e1457d558e
5 changed files with 6 additions and 22 deletions

View file

@ -100,6 +100,9 @@ def before_request():
g.timestamp = int(time.time())
session.permanent = True
if not session.get("session_id"): session["session_id"] = secrets.token_hex(49)
if '; wv) ' in request.headers.get("User-Agent",""): g.webview = True
else: g.webview = False
@ -115,14 +118,4 @@ def after_request(response):
response.headers.add("X-Frame-Options", "deny")
return response
@app.route("/", subdomain="www")
@app.route("/", subdomain="old")
def sub_redirect():
return redirect(f"https://{app.config['SERVER_NAME']}")
@app.route("/<path:path>", subdomain="www")
@app.route("/<path:path>", subdomain="old")
def sub_redirect2(path):
return redirect(f"https://{app.config['SERVER_NAME']}{request.full_path}")
from files.routes import *