Limit expression size in firewall rule

I need to block very many different referrers in firewall rule policy.

There was a problem with maximum limit of a expression size of list of referrers.

expression size exceeded maximum 4096

how can I increase this limit, and is it possible at all?

There’s no way to increase that limit on your own. I don’t see a limit listed in the API for the filter, so that may be worth a try.
Otherwise, you may have to break it down into two firewall rules.

1 Like

What of whitelisting your own origin/site & disallowing all other referrers? Is that feasible for your specific work?

You may want to “reverse” your rule. Make a bunch of If NOT a referrer you want, then JS Challenge. Then keep an eye on your Firewall Events log for challenges you want to whitelist in that rule.

1 Like

Only allow your site’s referrer (you may want to set up a referrer-policy header so that you can limit it to only allowing your own origin).

Only allow the proper Google & Yandex UAs. Block all other bots.

I believe the referrer policy header only applies to outbound links, so the destination can or can not see that your site referred the visitor out to them.

You’re correct regarding outbound links. If it’s set, however, they will know when it’s one page or another of their site that was from where the header was sent. A subdomain setup is helpful for this, if not needed due to subs being considered different origins in modern browsers.

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