Need an idea to match an URL pattern to trigger Rate Limiting rule on a free plan while having Cache Everything - if possible?

Greetings,

I have the URL pattern as follow:

  • https://www.mydomain.com/search-page/search/?searchwp=string&submit=Search

One of the Firewall Rule with action Block contains:

  • (http.request.uri.query contains "searchwp=" and ip.geoip.country ne "MYCOUNTRY")
  • block all the requests to the “search” one, except requests from my country (but want to use Rate Limiting, just in case, if possible?)

While having a Page Rule on *.mydomain.com/* with the option Cache Level: Cache Everything, actually it catches the page and serves it via cache (HIT as obviously) and seems to me I cannot trigger the Rate Limit event as setup from below screenshot:

Any idea how to tirgger it - if it is possible, due to Cache Everything rule?
May I ask will it actually ever trigger?

I am using Free plan and cannot trigger the query like ?searchwp= (WordPress plugin for advanced search), rather have to trigger either /search-page/ or /search/?

Like, for example, if I add in the input field */wp-admin/admin-ajax.php*, it catches the exact request and I got Rate Limit error page as it has to be “You are being rate limited (Error 1015)”.

Or better to approach would be to protect admin-ajax.php (just in case, generally speaking), as the search result page would always get in a cache (HIT) after a first try (somewhat protected that way - if not adding other query parameters to the URL)?

  • Ajax is not being used in a search, it’s a simple POST request from the <input> form, but the URL of the search results (and the request to the databse) is as an example from above …

NOTICE: When testing I was using simple refresh tab (F5) of the Web browser (maybe this is the issue - but on admin-ajax.php worked well?)

Thanks in advance for any kind of information

I don’t know if you have a problem with rate limiting but that usually occurs if you send requests too fast, to fix it wait a little while to send requests (about an hour or so)

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