Cf.client.bot not available

#1

Hi All,
I saw that Cloudflare is providing the option to identify bots
https://developers.cloudflare.com/firewall/cf-firewall-rules/fields-and-expressions/

but when I’m trying to access this object in the worker (request.cf.client.bot) it is not available.
actually even request.cf.client isn’t available.

btw,
I have created the role in “Firewall Rules” that allows the bots traffic through my worker.

thanks!

#2

Hi @dan19,

The linked documentation is for Firewall Rules, not Workers. cf.client.bot can be part of a Firewall Rule expression, but that is separate from the Workers concept of request attributes. The list of request attributes we currently support is here: https://developers.cloudflare.com/workers/reference/request-attributes/

Harris

1 Like
#3

Hi Harris,
Thanks for the quick response.
Is there any way I can identify bots through Cloudflare workers?
maybe a built-in feature?