mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
aurweb.asgi: Allow unsafe-inline style-src in CSP
Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
85ba4a33a8
commit
bfffdd4d91
1 changed files with 2 additions and 0 deletions
|
@ -88,6 +88,8 @@ async def add_security_headers(request: Request, call_next: typing.Callable):
|
||||||
"cdn.jsdelivr.net"
|
"cdn.jsdelivr.net"
|
||||||
]
|
]
|
||||||
csp += f"script-src 'self' 'nonce-{nonce}' " + ' '.join(script_hosts)
|
csp += f"script-src 'self' 'nonce-{nonce}' " + ' '.join(script_hosts)
|
||||||
|
# It's fine if css is inlined.
|
||||||
|
csp += f"; style-src 'self' 'unsafe-inline'"
|
||||||
response.headers["Content-Security-Policy"] = csp
|
response.headers["Content-Security-Policy"] = csp
|
||||||
|
|
||||||
# Add XTCO header.
|
# Add XTCO header.
|
||||||
|
|
Loading…
Add table
Reference in a new issue