Allow static_url domain in prod
This commit is contained in:
parent
c10aedd4dc
commit
4c5a4f29b8
@ -127,6 +127,8 @@ def make_flask_callbacks(app):
|
||||
|
||||
|
||||
def set_default_headers(app): # pragma: no cover
|
||||
static_url = app.config.get("STATIC_URL")
|
||||
|
||||
@app.after_request
|
||||
def _set_security_headers(response):
|
||||
response.headers[
|
||||
@ -143,7 +145,7 @@ def set_default_headers(app): # pragma: no cover
|
||||
else:
|
||||
response.headers[
|
||||
"Content-Security-Policy"
|
||||
] = "default-src 'self' 'unsafe-eval' 'unsafe-inline'"
|
||||
] = f"default-src 'self' 'unsafe-eval' 'unsafe-inline' {static_url}"
|
||||
|
||||
return response
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user