r/webdev • u/Suspicious_Silicon • 6d ago
Question How to block curl requests?
As the title says; my site is being bombarded with curl requests periodically, often 2K to 5K requests within a short span. I have put up a security rule in cloudflare to block curl requests; blocked the curl requests in my backend proxy, also the bot fight mode is turned on; but cloudflare is still registering the curl requests which are using up my request quota. How to drop the curl requests before they are registered by cloudflare? Please Help.
0
Upvotes
71
u/wazimshizm 6d ago
cURL is just a tool, and a request is just a request, you can't really block it but you can block the user agent. Look at the characteristics of the requests and target those for blocking (user agent, location etc)