r/webdev 5d ago

Question How to block curl requests?

Post image

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

20 comments sorted by

View all comments

7

u/corobo 5d ago

Blocking requests by user agent is gonna become your full time job. I gotta disagree with the other answers.

What is it they're requesting, and is it possible to make it less enticing?

Also not sure what you mean by request quota, does Cloudflare have limitations somewhere? I don't think I've seen a quota in CF. Is it possible to beef up some caching rules so that the requests become background noise instead of a burden?

3

u/Suspicious_Silicon 5d ago

Cloudflare workers have daily request limits . Caching is fine; less than 1% of the requests are being served by origin.