Deploy content security rules in production

Last updated May 5, 2026 Note

Only available to customers with Client-Side Security Advanced.

Follow the practices on this page when deploying or updating content security rules in a production environment. Applying rule changes without a validation period can block legitimate resources and disrupt your application for end users.

Update rules safely

When updating content security rules in production, avoid the following:

  • Do not edit an existing rule directly in production without testing first.
  • Do not change a rule action from Log to Allow without a validation period.
  • Do not delete all rules at once.

Instead, follow these practices:

  • Test changes in a staging environment before applying them in production.
  • Use the Log rule action for at least seven days before switching to Allow.
  • Update one rule at a time.
  • Monitor rule violations for 24 hours after each change.
  • Document a rollback procedure before making changes.

Pre-enforcement checklist

Complete the following checklist before switching a content security rule from Log to Allow:

  • The rule was tested in Log mode for a minimum of seven days.
  • Reviewed all rule violations and confirmed there are no unexpected blocks.
  • Added all legitimate third-party resources to the rule allowlist.
  • Tested the application on all major browsers (Chrome, Firefox, Safari, Edge).
  • Configured alerts for rule violations.
  • There is a documented rollback procedure that is ready to execute.

Caution

Switching a rule from Log to Allow without completing this checklist may block resources required by your application. This will directly affect your end users.

Rollback a rule change

If a rule change causes unexpected violations or blocks legitimate resources:

  1. Switch the rule action back to Log to stop blocking resources immediately.
  2. Review the rule violations to identify which resources were blocked.
  3. Update the rule to include any missing resources.
  4. Repeat the validation process before switching back to Allow (blocks resources not present in the allowlist).

Was this helpful?

YesNo

On this page

Deploy content security rules in product - 图1Docs

{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/client-side-security/best-practices/deploy-rules-in-production/#page","headline":"Deploy content security rules in production","description":"Safe practices for deploying and updating content security rules.","url":"https://developers.cloudflare.com/client-side-security/best-practices/deploy-rules-in-production/","inLanguage":"en","image":"https://developers.cloudflare.com/client-side-security/best-practices/deploy-rules-in-production/og.png?v=24e0d9da84e17e98","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":["CSP"]}


description: If you receive a client-side resource alert, sometimes you need to perform some manual investigation to confirm the nature of the script. Use the guidance provided in this page as a starting point for your investigation. title: Handle a client-side resource alert image: https://developers.cloudflare.com/client-side-security/best-practices/handle-an-alert/og.png?v=38716e097a5534b5


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.