mirror of
https://github.com/janeczku/calibre-web
synced 2025-10-24 20:07:41 +00:00
Merge remote-tracking branch 'trustedhost/master'
This commit is contained in:
@@ -82,7 +82,7 @@ except ImportError:
|
||||
|
||||
@app.after_request
|
||||
def add_security_headers(resp):
|
||||
resp.headers['Content-Security-Policy'] = "default-src 'self' 'unsafe-inline' 'unsafe-eval'; font-src 'self' data:; img-src 'self' data:"
|
||||
resp.headers['Content-Security-Policy'] = "default-src 'self'" + ''.join([' '+host for host in config.config_trustedhosts.strip().split(',')]) + " 'unsafe-inline' 'unsafe-eval'; font-src 'self' data:; img-src 'self' data:"
|
||||
if request.endpoint == "editbook.edit_book" or config.config_use_google_drive:
|
||||
resp.headers['Content-Security-Policy'] += " *"
|
||||
resp.headers['X-Content-Type-Options'] = 'nosniff'
|
||||
|
||||
Reference in New Issue
Block a user