Client-side security FAQ

Last updated May 5, 2026

What happens to CSP HTTP headers set by the origin server when I create a content security rule?

When you create content security rules, Cloudflare will generate content security policy (CSP) directives from those rules based on their configuration:

  • Log rules will create CSP directives for the Content-Security-Policy-Report-Only HTTP header.
  • Allow rules will create CSP directives for the Content-Security-Policy HTTP header.

Client-side security only adds new CSP HTTP headers to the response. This means that Cloudflare will keep any Content-Security-Policy-Report-Only and Content-Security-Policy HTTP headers in the response set by the origin server and it will add separate HTTP headers for the content security rules configured on your Cloudflare zone.

It is recommended that you only have one rule in allow mode (that is, a content security rule being enforced). If there is more than one Content-Security-Policy HTTP header in the response, the most restrictive policy wins. For more information, refer to the MDN documentation ↗︎.

Can I add a nonce CSP directive to a content security rule?

Client-side security currently does not support nonce ↗︎ directives in content security rules. Instead, you can use a hash ↗︎ CSP directive. For details on the supported directives and values, refer to Supported CSP directives.

Was this helpful?

YesNo

On this page

Client-side security FAQ - 图1Docs

{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/client-side-security/faq/#page","headline":"Client-side security FAQ","description":"Answers to common questions about client-side security rules, CSP headers, and monitoring.","url":"https://developers.cloudflare.com/client-side-security/faq/","inLanguage":"en","image":"https://developers.cloudflare.com/client-side-security/faq/og.png?v=fb84bf1d128a044b","dateModified":"2026-05-05","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"},"keywords":["Headers","CSP"]}


description: Resolve common issues with client-side resource monitoring and script detection. title: Troubleshooting image: https://developers.cloudflare.com/client-side-security/troubleshooting/og.png?v=c6e44b43ee29a7f0


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/client-side-security/llms.txt
Use this file to discover all available pages before exploring further.