fix: correctly allow resources from localhost

This commit is contained in:
Vendicated 2025-06-14 00:55:14 +02:00
parent b35b72c066
commit 2a398985cf
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18
3 changed files with 11 additions and 9 deletions

View file

@ -19,8 +19,10 @@ export const ImageScriptsAndCssSrc = [...ImageAndCssSrc, "script-src", "worker-s
// script and just adding to it. But generally, you should just edit this file instead
export const CspPolicies: PolicyMap = {
"localhost": ImageAndCssSrc,
"127.0.0.1": ImageAndCssSrc,
"http://localhost:*": ImageAndCssSrc,
"http://127.0.0.1:*": ImageAndCssSrc,
"localhost:*": ImageAndCssSrc,
"127.0.0.1:*": ImageAndCssSrc,
"*.github.io": ImageAndCssSrc, // GitHub pages, used by most themes
"github.com": ImageAndCssSrc, // GitHub content (stuff uploaded to markdown forms), used by most themes