Currently, Firewall rules block traffic by returning HTTP status 403 (forbidden).
I want to return HTTP status code 404 or 400 whenever the firewall blocks any traffic. How to achieve this in Cloudflare ? Is this possible currently ? I am using the free plan. Is it possible in the paid/pro plans ? Using workers ?
My use case is very simple and probably very common -
- My website has pages with patterns /trends*, /news*, /sitemap*, /ads*, /robots* only
- All other page patterns are to be blocked (non existing pages on my website)
- I have setup a firewall rule to block all patterns except the above. This will completely eliminate unnecessary traffic to my origin server. But I want the CF firewal to return 404 or 400 http status code. It currently returns 403 which is not correct for my usecase and can create SEO problems etc
Can this feature be added to Cloudflare Firewall Rules ? i.e. new options for Blocking i.e. Block(403), Block(404), Block(400).
Kindly review and advise.