Home
Support Forums

Preview build doesn't load the Js because of Content Security Policy

I have a problem when on my preview build.
It doesn’t load the Js and shows a blank page.
After adding this header on netlify.toml, it still got an error.
But on the production, it doesn’t have any issue.
I’ve already tried a lot of configs like default-src, but still not working.

Here is the preview build:
https://deploy-preview-4--fervent-murdock-6f7a86.netlify.app/

Here is the production:
https://fervent-murdock-6f7a86.netlify.app/

Here is the netlify.toml:

[[headers]]
  for = "/*"
    [headers.values]
    Content-Security-Policy = "script-src 'self' 'unsafe-inline' *.netlify.app *.netlify.com;"

Hey @riolly,

The blocked script appears to be the one Netlify is loading for the CDP feature and doesn’t seem to have to do anything with the white page. I don’t see any of your scripts being blocked.

Yeah, I just realize that. My wrong.