forked from rDrama/rDrama
master
parent
f2081b7594
commit
b867b5c0ff
|
@ -169,12 +169,15 @@ def before_request():
|
||||||
else:
|
else:
|
||||||
g.system="other/other"
|
g.system="other/other"
|
||||||
|
|
||||||
@app.after_request
|
@app.teardown_appcontext
|
||||||
def after_request(response):
|
def teardown_request():
|
||||||
|
|
||||||
if hasattr(g, 'db') and g.db:
|
if hasattr(g, 'db') and g.db:
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
g.db.close()
|
g.db.close()
|
||||||
|
g.db.remove()
|
||||||
|
|
||||||
|
@app.after_request
|
||||||
|
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("Referrer-Policy", "same-origin")
|
response.headers.add("Referrer-Policy", "same-origin")
|
||||||
|
|
Loading…
Reference in New Issue