This commit is contained in:
Aevann1 2021-12-29 10:29:22 +02:00
parent 1c71ebff45
commit aa7db683e8
8 changed files with 20 additions and 17 deletions

View file

@ -102,6 +102,9 @@ def before_request():
url = request.url.replace("http://", "https://", 1)
return redirect(url, code=301)
if '; wv) ' in request.headers.get("User-Agent",""): g.webview = True
else: g.webview = False
@app.teardown_appcontext
def teardown_request(error):
if hasattr(g, 'db') and g.db: