mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
FastAPI: use internal typeahead and remove jquery
Awesome! Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
2835dd89ea
commit
3a74f76ff9
6 changed files with 20 additions and 35 deletions
|
@ -83,10 +83,7 @@ async def add_security_headers(request: Request, call_next: typing.Callable):
|
|||
# Add CSP header.
|
||||
nonce = request.user.nonce
|
||||
csp = "default-src 'self'; "
|
||||
script_hosts = [
|
||||
"ajax.googleapis.com",
|
||||
"cdn.jsdelivr.net"
|
||||
]
|
||||
script_hosts = []
|
||||
csp += f"script-src 'self' 'nonce-{nonce}' " + ' '.join(script_hosts)
|
||||
# It's fine if css is inlined.
|
||||
csp += "; style-src 'self' 'unsafe-inline'"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue