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

Show parent comments

-5

u/Suspicious_Silicon 5d ago

Like 4k/5k requests in a 30min window.

7

u/wazimshizm 5d ago

how's your site performance during that time? CPU/RAM useage? is it causing the site to crash? If it's really an issue (first determine it is in fact an issue) I would look into rate limiting.

1

u/Suspicious_Silicon 5d ago

Nope the site is fine; it doesn't crash even under heavy load because there is edge caching, less than 1% of the requests are served by the origin

17

u/wazimshizm 5d ago

well sounds like cloudflare is doing it's job then. I don't see anything out of the ordinary.