diff --git a/src/main/csp.ts b/src/main/csp.ts index 2b92ad57..82f1dd92 100644 --- a/src/main/csp.ts +++ b/src/main/csp.ts @@ -14,6 +14,9 @@ const CssSrc = ["style-src", "font-src"]; const MediaAndCssSrc = [...MediaSrc, ...CssSrc]; const MediaScriptsAndCssSrc = [...MediaAndCssSrc, "script-src", "worker-src"]; +// Plugins can whitelist their own domains by importing this object in their native.ts +// script and just adding to it + export const CspPolicies: PolicyMap = { "*.github.io": MediaAndCssSrc, // github pages, used by most themes "raw.githubusercontent.com": MediaAndCssSrc, // github raw, used by some themes