Why is the firewall matches option unavailable?

I’m trying to setup firewall rules to block access to all URL paths except a few. I was trying to use the matches operator I saw In the docks but it seems like it’s unavailable. Is it only a Pro/Business functionality?

Screen Shot 2021-11-18 at 10.52.28

Not in Pro either. I would assume “equals” and “matches” are the same given their meanings are interchangeable in this context.

I don’t think so. Equals seems to be for exact matches.

At Cloudflare Docs they show some examples using the matches operator
Fields and expressions · Cloudflare Firewall Rules docs

When detailing the operators they even mention that it is regex based (Operators and grouping symbols · Cloudflare Firewall Rules docs) but when I try to use it (in the expression editor) it says its an unavailable operator.

These are only available from Business and higher. If you are not on such a plan, that functionality won’t be available.

https://developers.cloudflare.com/firewall/cf-firewall-language/values#case-sensitivity-and-regular-expressions-in-values for details.

Thanks, that answers my question

then use “contains”?

The ideal usage is with the matches operator but the contains might work as a poor man’s workaround.

If you want a sub-string you can certainly use it. It’s a very different animal than matches of course.

matches is regular expression match.

1 Like

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