Can i create actions/rules based on the HTTP response code?

Let’s say that my website return a 429(Too many requests) status code, and i would like to add the client IP to the firewall, to block it. Can it be done on cloudflare?

I know that there’s a option called Rate Limit, but it’s paid.

1 Like

You could do it with the API as part of the request/after the request on your server, provided that you also have some system set up that removes them after some amount of time. The limitation to this is that you’re limited to 1200 API requests per 5 minute period, and that you can only have so many firewall rules enabled:

But, if you would really like to block at the Cloudflare level, it is highly recommended to use the rate limiting feature.

1 Like

I use the nginx module, so i can’t use the Cloudflare API on it.

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.