HTTP referer: move setting it to nginx from python
parent
ef4fc4dd99
commit
8bbcb9902e
|
@ -112,7 +112,6 @@ 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")
|
||||||
response.headers.add("Referrer-Policy", "same-origin")
|
|
||||||
if response.status_code < 400:
|
if response.status_code < 400:
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
g.db.close()
|
g.db.close()
|
||||||
|
|
|
@ -4,6 +4,7 @@ server {
|
||||||
listen 80;
|
listen 80;
|
||||||
listen [::]:80;
|
listen [::]:80;
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host $http_host;
|
||||||
|
add_header Referrer-Policy sameorigin;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://localhost:5000/;
|
proxy_pass http://localhost:5000/;
|
||||||
|
|
Loading…
Reference in New Issue