Issues with Bot Fight Mode Not Detecting Bots on Cloudflare Worker
Hello Cloudflare Community,
I hope you all are doing well. I'm reaching out with a concern that’s been bothering me for some time, and I’m hoping someone here might be able to shed some light on it.
I’ve recently enabled the free version of Bot Fight Mode on my Cloudflare account, expecting it to help me detect and mitigate bot traffic. However, despite enabling it, I’m not seeing any evidence that it’s working, especially when I check the logs for requests handled by my Worker.
Here’s a quick rundown of what I’ve done:
1. Enabled Bot Fight Mode: I’ve enabled the free version of Bot Fight Mode in my Cloudflare dashboard.
2. Real User Testing: I’ve been sending requests from my own browser to test this, and I can confirm that the requests are hitting Cloudflare and being logged.
3. Worker Setup: My Worker is set up on a subdomain of my main domain, and the requests are processed through this Worker.
Issues:
1. Despite enabling Bot Fight Mode, the botManagement object in request.cf is not being populated in my Worker.
2. Logs don’t show any bot-related information, leaving me unsure if Bot Fight Mode is even being applied.
3. I’m on the free plan, so I’m wondering if this is a limitation of the free tier or if I might be missing something in my configuration.
Questions:
1. Is request.cf.botManagement supposed to work with the free version of Bot Fight Mode, or is it only available on higher-tier plans?
2. Could the issue be related to my Worker being on a subdomain? Does Bot Fight Mode apply differently in this case?
3. Has anyone else experienced this issue, and if so, how did you resolve it?
I’m feeling a bit stuck and would greatly appreciate any guidance or advice you can provide. I’m dedicated to making this work and am open to any suggestions or tips. Your help means a lot to me, and I’m hopeful that together, we can figure this out.
Thank you so much in advance!
1 Reply
The thing is when I'm developing worker locally I'm able to access this botManagement field, but when I'm deploying the worker, the field is not available.
Got it, so I won't be able to control botManagment using workers logic in free plan, isn't it?
Also, in general how secure "bot fight mode" and "Block AI Scrapers and Crawlers" are together combined?
Basically I just want to check that no one just randomly sets the header of https version of my website on their request origin. WIll free plan be able to block it or not?