Firewall, block user agent

If blocking a user agent in the firewall, would regex operators work? I want to block all UAs starting with “Java” and the only option is “contains” or “equal” - how to mark it with “begins with” ?

Thanks

If you are part of the business package, https://developers.cloudflare.com/ruleset-engine/rules-language/expressions

1 Like

You can do regex for firewall rules but only on Business or Enterprise plans. The rule would be http.user_agent match "^j|Java"

2 Likes

I see. Then I’ll continue managing such in my .htaccess file.

Thanks very much.

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