Adding bot score as a header passed to origin?

Our plan supports Bot Management and we use it to block known bots from crawling certain URLs. Ideally, though, we’d pass Cloudflare’s bot score (eg. cf.bot_management.score) as a header, which would be sent to origin so the server can decide how to handle it.

Does anyone know if this is possible? I’ve tried adding it as a worker, but (or doesn’t seem to have these fields, and when I play with firewall rules my only choices are to block/challenge the requests.

My use case here is that I want to allow good bots through so they can render an HTML preview (eg. Twitterbot fetching a URL and showing its text/image) but to avoid the bot triggering some application-specific code which only humans should execute.

1 Like

You should be able to do this very easily with Transform Rules.


Ahh thank you! I tried this initially but experimented using the wrong account which didn’t have Bot Management enabled, so I got an error. Will try it on Production instead!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.