move 2 headers from python to nginx
parent
9985e5c6f6
commit
684bd24326
|
@ -110,8 +110,6 @@ def before_request():
|
|||
|
||||
@app.after_request
|
||||
def after_request(response):
|
||||
response.headers.add("Strict-Transport-Security", "max-age=31536000")
|
||||
response.headers.add("X-Frame-Options", "deny")
|
||||
if response.status_code < 400:
|
||||
g.db.commit()
|
||||
g.db.close()
|
||||
|
|
|
@ -5,6 +5,8 @@ server {
|
|||
listen [::]:80;
|
||||
proxy_set_header Host $http_host;
|
||||
add_header Referrer-Policy same-origin;
|
||||
add_header Strict-Transport-Security "max-age=3153600";
|
||||
add_header X-Frame-Options "deny";
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:5000/;
|
||||
|
|
Loading…
Reference in New Issue