move 2 headers from python to nginx

master
Aevann1 2022-10-30 02:46:50 +02:00
parent 9985e5c6f6
commit 684bd24326
2 changed files with 2 additions and 2 deletions

View File

@ -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()

View File

@ -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/;