I’m using mantine version 6.0.13 and vite
I’m facing issue after applying the CSP directive in header, mentioned below
CSP"Content-Security-Policy","default-src http://localhost; style-src 'self' 'nonce-rAnd0m123' http://localhost; font-src 'self';"
Issue
Refused to apply inline style because it violates the following Content Security Policy directive:
"style-src 'self' 'nonce-rAnd0m123' http://localhost".
Either the 'unsafe-inline' keyword, a hash, or a nonce ('nonce-...') is required to enable inline execution.
Note that hashes do not apply to event handlers, style attributes and javascript:
navigations unless the 'unsafe-hashes' keyword is present.
We have not used any inline styles src in my code, but still getting the above mentioned error, might it looks like mantine creating internally a inline style src
Please provide some suggestion to fix this issue or any workaround.
I tried inline_RUNTIME_CHUNK=false
but not work for me, because I’m not using react-script
Shubham Sharma is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.