temp fix for bullshit

master
Aevann1 2022-06-26 08:35:41 +02:00
parent 49032231d3
commit c715185e85
1 changed files with 1 additions and 5 deletions

View File

@ -95,17 +95,13 @@ def before_request():
def after_request(response):
response.headers.add("Strict-Transport-Security", "max-age=31536000")
response.headers.add("X-Frame-Options", "deny")
g.db.commit()
g.db.close()
del g.db
return response
@app.teardown_appcontext
def teardown_request(error):
if hasattr(g, 'db') and g.db:
g.db.rollback()
g.db.commit()
g.db.close()
del g.db
stdout.flush()
if app.config["SERVER_NAME"] == 'localhost':