How to write a waf rule on cloudflare

from cloudflare document I know use API to create a ruleset ,add waf rule to ruleset , deploy the ruleset .
but I want to know how to write to a waf rule ?
do you give a sample or document ?
thank you!

Where are you seeing that this is possible? The API calls you mention are for existing WAF rules.

It’s possible to make your own Firewall Rule. That’s listed in the WAF section of dev docs.


OK ,thank you for your reply.
The mean that Cloudflare API can create ruleset and add waf rule into ruleset.
but want to create a waf rule use the follow doc ,then a firewall rule == a waf rule.
Is my understanding correct ?

I just stick to calling it a Firewall Rule since there’s a specific place in the dashboard for that, and it’s separate from where WAF rules are.

If I was going to use the API to create a Firewall Rule, I’d use this API syntax:

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.