Cloudflare Zaraz supports CSP
Mar 15, 2022Simona Badoiu

Summary
This post details how Cloudflare Zaraz was enhanced to support Content Security Policy (CSP). It explains the potential conflict between Zaraz's script injection and CSP's security measures, and how Zaraz resolves this by dynamically adding a nonce to the `script-src` directive. It also covers edge cases such as handling multiple CSP headers, the interaction with `unsafe-inline`, and the creation of a `script-src` policy when it's not explicitly defined. The post confirms that Zaraz will comply with CSP settings without additional user configuration.
More from the Website Security & Threat Management trail
- We tested our own WAF with frontier AI models. Here’s what we found
- When scanners miss the attack: how Cloudflare Client-Side Security protects storefronts
- Introducing automatic remediation policies with Cloudflare CASB
- Introducing context-aware vulnerability discovery and remediation with Cloudflare Managed Defense and OpenAI Daybreak Models
- Introducing Adaptive Intelligence: undermining the economics of every bot attack