Can CloudFlare detect status code of request and use it in Firewall Rule?

Can CloudFlare detect status code of request and use it in Firewall Rule? If lets say a user request gets status code “403” to tell CloudFlare to block this IP from the entire website?

Firewall rules wont allow you to do that, however you could implement a custom Worker and block an IP upon a 403 either through an API call to the Cloudflare’s firewall settings or by saving the IP address in the KV database and blocking it from within the Worker.

1 Like

On Business or Enterprise plans you can use the response in a rate limiting rule.

2 Likes

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