fix: add unsafe-eval to production CSP — Livewire uses eval()
Alpine.js evaluates expressions via eval() at runtime. Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
87ae36ef22
commit
7d7c489509
1 changed files with 3 additions and 5 deletions
|
|
@ -169,11 +169,9 @@ return [
|
|||
'style-src' => ["'unsafe-inline'"],
|
||||
],
|
||||
'production' => [
|
||||
// Livewire and Alpine require unsafe-inline for their
|
||||
// runtime-injected scripts and styles. Enable nonces
|
||||
// (SECURITY_CSP_NONCE_ENABLED=true) only if all inline
|
||||
// content carries the nonce attribute.
|
||||
'script-src' => ["'unsafe-inline'"],
|
||||
// Livewire and Alpine require unsafe-inline and unsafe-eval
|
||||
// for runtime-injected scripts/styles and expression evaluation.
|
||||
'script-src' => ["'unsafe-inline'", "'unsafe-eval'"],
|
||||
'style-src' => ["'unsafe-inline'"],
|
||||
],
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue