INTEGRITY Cloudflare Docs

Content Security Policies (CSPs)

A Content Security Policy (CSP) is an added layer of security that helps detect and mitigate certain types of attacks, including:

To learn more about configuring a CSP in general, refer to the Mozilla documentation.

Using a CSP with Cloudflare

Cloudflare's CDN is compatible with CSP.

Cloudflare does not:

If you require the CSP headers to be changed or added, you can change them using some Cloudflare products:

Product requirements

To use certain Cloudflare features, however, you may need to update the headers in your CSP:

Feature(s) Updated headers
Rocket Loader script-src 'self' ajax.cloudflare.com;
Scrape Shield script-src 'self' 'unsafe-inline'
Web Analytics script-src static.cloudflareinsights.com; connect-src cloudflareinsights.com
Bot products Refer to JavaScript detections and CSPs.
Client-side security (formerly Page Shield) Refer to CSP header format.
Zaraz No updates required (details).
Turnstile Refer to Turnstile CSP.