master
Aevann1 2021-08-11 23:15:30 +02:00
parent 5a0b814343
commit 169cb9536e
1 changed files with 5 additions and 0 deletions

View File

@ -254,8 +254,13 @@ def after_request(response):
print(e)
abort(500)
response.headers.add('Access-Control-Allow-Headers', "Origin, X-Requested-With, Content-Type, Accept, x-auth")
response.headers.remove("Cache-Control")
response.headers.add("Cache-Control", "public, maxage=600")
response.headers.add("Strict-Transport-Security", "max-age=31536000")
response.headers.add("Referrer-Policy", "same-origin")
response.headers.add("Feature-Policy", "geolocation 'none'; midi 'none'; sync-xhr 'none'; microphone 'none'; camera 'none'; magnetometer 'none'; gyroscope 'none'; fullscreen 'none'; payment 'none';")
if not request.path.startswith("/embed/"): response.headers.add("X-Frame-Options", "deny")
return response