Info in advance:
I use Netlify and therefore also the netlify.toml file given by Netlify to clear things like CSP or HSTS.
Also, I am using Cloudflare.
The problem:
Cloudflare's JavaScript Detection service injects code into my website. However, since my Content Security Policy is not adjusted accordingly, the following error occurs:
Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' ..."
The whole error message is on the website.
The current CSP:
I have tried to adjust my CSP / script-src accordingly. Here is my approach:
script-src 'self' ajax.cloudflare.com cdnjs.cloudflare.com static.cloudflareinsights.com;
The default-src is set to none.
Any help is appreciated. I haven't tried setting the CSP in the HTML script yet.