Detect Verified Bots
26 Replies
Gonna make a thread so there isn't 2 support chats at once
cc: @Isaac McFadyen | YYZ01 @sromexs
Awesome.
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
By Verified Bots we mean known good bots.
Bots that won't harm your site, or spam etc.
That can be search engines or other bots like the Instagram bot.
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
You want this to always fire
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
so edit expression
and just set it to true
then add a header
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
No, true means always fire
True means it will always fire.
For every request.
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
The header
X-Is-Bot
will be true
for known bots and false
for everything elseUnknown User•3y ago
Message Not Public
Sign In & Join Server To View
yes
Yes, that sets a "dynamic" header which means it'll be based on the cf.client.bot score.
Which Cloudflare gives you to tell you if it's a known bot.
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
So basically it goes
request comes in -> Cloudflare tells you if it's a bot using
cf.client.bot
-> then your rule fires which causes it to add a "dynamic" header which is the same as the cf.client.bot
-> and then your origin can read that header.Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Yes.
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
And then your rule makes Cloudflare assign the X-Is-Bot header the same value of the boolean
cf.client.bot
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Try without the brackets? I'm not sure, I haven't used the rule syntax much.
Remove the brackets
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View