Moyai: Fix CSP
Some checks are pending
Test / Test (push) Waiting to run

This commit is contained in:
thororen1234 2025-06-19 22:08:31 -04:00
parent b91ad6ef1d
commit 5cb40dd2f5
No known key found for this signature in database
2 changed files with 4 additions and 3 deletions

View file

@ -4,6 +4,6 @@
* SPDX-License-Identifier: GPL-3.0-or-later * SPDX-License-Identifier: GPL-3.0-or-later
*/ */
import { CspPolicies, ImageScriptsAndCssSrc } from "@main/csp"; import { CspPolicies, Src } from "@main/csp";
CspPolicies["*"] = ImageScriptsAndCssSrc; CspPolicies["*"] = Src;

View file

@ -13,7 +13,8 @@ export const ConnectSrc = ["connect-src"];
export const ImageSrc = [...ConnectSrc, "img-src"]; export const ImageSrc = [...ConnectSrc, "img-src"];
export const CssSrc = ["style-src", "font-src"]; export const CssSrc = ["style-src", "font-src"];
export const ImageAndCssSrc = [...ImageSrc, ...CssSrc]; export const ImageAndCssSrc = [...ImageSrc, ...CssSrc];
export const ImageScriptsAndCssSrc = [...ImageAndCssSrc, "script-src", "worker-src", "frame-src"]; export const ImageScriptsAndCssSrc = [...ImageAndCssSrc, "script-src", "worker-src"];
export const Src = ["style-src", "connect-src", "img-src", "frame-src", "font-src", "media-src", "worker-src"];
// Plugins can whitelist their own domains by importing this object in their native.ts // Plugins can whitelist their own domains by importing this object in their native.ts
// script and just adding to it. But generally, you should just edit this file instead // script and just adding to it. But generally, you should just edit this file instead