forked from MarseyWorld/MarseyWorld
temp fix for bullshit
parent
49032231d3
commit
c715185e85
|
@ -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':
|
||||
|
|
Loading…
Reference in New Issue