I am using spatie/laravel-csp package to set CSP headers on laravel application.
But the inline style could not be applied and refused with the following error.
Refused to apply inline style because it violates the following Content Security Policy
directive: "style-src 'self' 'nonce-TjpZGox5zGathTvJDeVMfxzHaOtWMc7v' 'unsafe-inline'".
further detail.
- I am using laravel 7.
- /spatie/laravel-csp 2.8
- "laravel-mix": "^5.0.1",
- and inertia with Vue 2
What i have try so far.
- specify webpack_nonce @ entry file (main.js) webpack documentation
- Using inline scripts and styles as in spatie/laravel-csp documentation