nonce updates for livewire
This commit is contained in:
parent
844097ecf0
commit
8167c3a3e7
1 changed files with 3 additions and 2 deletions
|
|
@ -24,8 +24,9 @@ class AddContentSecurityPolicy
|
|||
"style-src 'self' 'unsafe-inline' http: https:; " .
|
||||
"connect-src 'self' ws: http: https:;";
|
||||
} else {
|
||||
// Production CSP - Livewire v3 requires unsafe-eval
|
||||
$csp = "script-src 'self' 'unsafe-eval' https:; " .
|
||||
// Production CSP - Livewire v3 requires unsafe-eval and nonce for inline scripts
|
||||
$nonce = csp_nonce();
|
||||
$csp = "script-src 'self' 'unsafe-eval' 'nonce-{$nonce}' https:; " .
|
||||
"style-src 'self' 'unsafe-inline' https:; " .
|
||||
"connect-src 'self' https:;";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue