laravel-debugbar
laravel-debugbar copied to clipboard
style-src CSP errors in 3.13.5
This may be a regression coming from the base php debugbar package.
To replicate, add 'self' and a nonce to style-src in your Content-Security-Policy. Then add the nonce to debugbar:
if (app()->bound('debugbar')) {
$debugbar = app(LaravelDebugbar::class);
$renderer = $debugbar->getJavascriptRenderer();
$renderer->setCspNonce(app('csp-nonce'));
}
You should see an error related to style-src upon loading any page with debugbar present.
This issue is not present in 3.12.2.
Feel free to make a PR with the fix 👍