1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-10-26 04:47:40 +00:00

Bugfixes from testrun (load images from gdrive)

Fix locale for new users
This commit is contained in:
Ozzie Isaacs
2021-10-07 19:53:32 +02:00
parent aca5324914
commit 25f608d109
5 changed files with 508 additions and 1237 deletions

View File

@@ -83,7 +83,7 @@ except ImportError:
@app.after_request
def add_security_headers(resp):
resp.headers['Content-Security-Policy'] = "default-src 'self' 'unsafe-inline' 'unsafe-eval'; img-src 'self' data:"
if request.endpoint == "editbook.edit_book":
if request.endpoint == "editbook.edit_book" or config.config_use_google_drive:
resp.headers['Content-Security-Policy'] += " *"
resp.headers['X-Content-Type-Options'] = 'nosniff'
resp.headers['X-Frame-Options'] = 'SAMEORIGIN'