style(SecureHeaders): update Content Security Policy directives
Refine CSP directives for improved security and clarity.
This commit is contained in:
parent
3ff21bdd49
commit
d2179fcdc8
1 changed files with 5 additions and 8 deletions
|
|
@ -108,16 +108,13 @@ class SecureHeaders
|
|||
]) . ' data:;',
|
||||
"worker-src 'self' blob:;",
|
||||
"object-src 'none';",
|
||||
'child-src ' . implode(' ', []) . ';',
|
||||
"object-src 'none';",
|
||||
"child-src 'none';",
|
||||
"font-src 'self' data: " . \implode(' ', [
|
||||
// * VITE DEV
|
||||
$viteDevOrigin,
|
||||
]) . ';',
|
||||
// ! Using CKEditor will must have unsafe-inline style
|
||||
// ! Using CKEditor / inline UI components requires unsafe-inline style
|
||||
"style-src 'self' 'unsafe-inline' " . \implode(' ', [
|
||||
$jsdelivrUrl,
|
||||
// * File Manager
|
||||
$jsdelivrUrl,
|
||||
// * VITE DEV
|
||||
$viteDevOrigin,
|
||||
|
|
@ -125,12 +122,12 @@ class SecureHeaders
|
|||
|
||||
// ! If you dont use ckeditor use this
|
||||
// "style-src 'self' 'nonce-$nonce';",
|
||||
"script-src 'self' 'nonce-$nonce' 'strict-dynamic' " . \implode(' ', [
|
||||
'https: blob:',
|
||||
"script-src 'self' 'nonce-$nonce' 'strict-dynamic' " . \implode(' ', array_filter([
|
||||
'https: blob:',
|
||||
$jsBo,
|
||||
// * VITE DEV
|
||||
$viteDevOrigin,
|
||||
]) . ';',
|
||||
])) . ';',
|
||||
];
|
||||
$response->headers->set(
|
||||
'Content-Security-Policy',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue