Cloudflare Docs
WAF
Visit WAF on GitHub
Set theme to dark (⇧+D)

Deploy managed rulesets via API

Use the Rulesets API to deploy managed rulesets at the account level or at the zone level.

Deploy WAF managed rulesets to the http_request_firewall_managed phase. Other managed rulesets, like DDoS Attack Protection managed rulesets, must be deployed to a different phase. Check the specific managed ruleset documentation for details.

You can define overrides to customize the behavior of the rules included in a managed ruleset.

Note: The zone-level http_request_firewall_managed phase can have at most three execute rules deploying managed rulesets, one for each available managed ruleset.

To learn more about deploying managed rulesets and configuring overrides using the Rulesets API, refer to Work with managed rulesets.