forked from rDrama/rDrama
temp fix for bullshit
parent
49032231d3
commit
c715185e85
|
@ -95,17 +95,13 @@ def before_request():
|
||||||
def after_request(response):
|
def after_request(response):
|
||||||
response.headers.add("Strict-Transport-Security", "max-age=31536000")
|
response.headers.add("Strict-Transport-Security", "max-age=31536000")
|
||||||
response.headers.add("X-Frame-Options", "deny")
|
response.headers.add("X-Frame-Options", "deny")
|
||||||
g.db.commit()
|
|
||||||
g.db.close()
|
|
||||||
del g.db
|
|
||||||
return response
|
return response
|
||||||
|
|
||||||
@app.teardown_appcontext
|
@app.teardown_appcontext
|
||||||
def teardown_request(error):
|
def teardown_request(error):
|
||||||
if hasattr(g, 'db') and g.db:
|
if hasattr(g, 'db') and g.db:
|
||||||
g.db.rollback()
|
g.db.commit()
|
||||||
g.db.close()
|
g.db.close()
|
||||||
del g.db
|
|
||||||
stdout.flush()
|
stdout.flush()
|
||||||
|
|
||||||
if app.config["SERVER_NAME"] == 'localhost':
|
if app.config["SERVER_NAME"] == 'localhost':
|
||||||
|
|
Loading…
Reference in New Issue