React-Router v7 - Caching does not work

I have a personal website running using react-router v7 in framework mode, deployed via Cloudflare Workers. Typically, I receive 100-500 requests per day. However, in the last few days, I got over 12.5k requests from just two different IP sources within roughly 3 hours. According to the Security > Analytics dashboard, 99% of the requests should be mitigated or cached by Cloudflare. Yet, when I checked the Workers dashboard, nearly all requests were billed. I have two questions: 1. How can I resolve the caching issue so that not all requests are billed? 2. How can I block requests like GET '/admin/.env' so they are blocked and not billed?
No description
No description
3 Replies
SuperHelpflare
SuperHelpflare6mo ago
There are always bots lurking around in the web. They knock on every domain, IP address, and port constantly looking for security holes. Most of them are rudimentary and try all exploits randomly, including ones for applications unrelated to your project, such as Wordpress or PHP. These bots learn about your domains (including .workers.dev and .pages.dev) near-instantly using Certificate Transparency logs, which cannot be disabled and are always issued (even on non-Cloudflare platforms). Some options to help reduce the noise from these bots: - Disable .workers.dev - Redirect .pages.dev - Enable Managed Rulesets (requires Pro plan or above)
Max
MaxOP6mo ago
Thank you for the quick reply! Sorry I don't understand what do you mean by ?bot-noise. Can I set this in the dashboard? Ah thank you! I've already disabled the .workers.dev domain and switched to my custom domain for my website. However, this doesn't resolve the issue, as the suspicious requests are targeting my custom domain. I’m using the Free plan. Any ruleset you’d suggest setting up?
Traneasy
Traneasy6mo ago
Hello pages.de v is this main domain name a custom domain name for cloudflare? I 've seen it many times in the community.

Did you find this page helpful?