fix: allow unsafe-inline for styles to fix CSP permanently
This commit is contained in:
1 parent
d173dd3194
commit
95b1955218
1 file changed
+1
-9
+1
-9
@@ -18,17 +18,9 @@ export function buildContentSecurityPolicy(nonce: string): string {
|
|||||||
|
|
||||||
const styleSrc = [
|
const styleSrc = [
|
||||||
"'self'",
|
"'self'",
|
||||||
|
"'unsafe-inline'",
|
||||||
`'nonce-${nonce}'`,
|
`'nonce-${nonce}'`,
|
||||||
"https://fonts.googleapis.com",
|
"https://fonts.googleapis.com",
|
||||||
"'sha256-Kj92o2EIJOPxE06VhJbN8NBhB0Nq5lhNV8aXMMLf5fQ='",
|
|
||||||
"'sha256-NwXHG+Ak6jw1mAqOvXUBP4wBN4kCG04iIIqq24r5gqY='",
|
|
||||||
"'sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU='",
|
|
||||||
"'sha256-CIxDM5jnsGiKqXs2v7NKCY5MzdR9gu6TtiMJrDw29AY='",
|
|
||||||
"'sha256-599zOKM2ViWVJC0ovicF5YwQ3sRN4OtbjneHwKvkzkY='",
|
|
||||||
"'sha256-UifRkzR11voNslzCZpw+l/wXjkp7FPao0hrYGvsVCEk='",
|
|
||||||
"'sha256-AsAFs+7spEal6Iw4gatQYc0bkXTozo7yk4HpSiol8R8='",
|
|
||||||
"'sha256-M6jR1MdPsGRqBdQRRQhZ7bZil3pe4mO+JdrJsw1zEsY='",
|
|
||||||
...(isDev ? ["'unsafe-inline'"] : []),
|
|
||||||
].join(" ");
|
].join(" ");
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|||||||
Reference in new issue
Block a user