Noob question: surrounding ( )

I see that the expression builder surrounds everything in ( ); eg,

(starts_with(http.request.uri.path, "/wp-")) or
(starts_with(http.request.uri.path, "/wordpress"))

Are those surrounding ( ) actually necessary? This doesn’t throw an error:

starts_with(http.request.uri.path, "/wp-") or
starts_with(http.request.uri.path, "/wordpress")

If not, that’ll save me a good chunk out of that 4k character limit :slight_smile:

It’ll let you know if there’s an issue with parentheses. If space is an issue, you can usually split the task across two rules (unless it would create some sort of conflict).

What is it you’re trying to accomplish?

I have a lot of exploit attempts that I have blocked in Apache, but I’m still having major server spikes so I’m trying to block them in Cloudflare before they ever touch the server. I’ve been able to get them all in 5 rules, but it’s a little tight on space so if I need to add more then I’ll be pretty limited.

Removing the surrounding ( ) will save me about 400 characters out of the 4096 :open_mouth:

I was super excited when I came across this, I thought I would be able to use regex and save a ton of space!

But alas, after I spent an hour coding it, I had an error that it’s only available in paid accounts :frowning: That would have been great information to have read in the docs before I started! LOL