Expand my Community achievements bar.

Join us for the next Community Q&A Coffee Break on Tuesday April 23, 2024 with Eric Matisoff, Principal Evangelist, Analytics & Data Science, who will join us to discuss all the big news and announcements from Summit 2024!
SOLVED

Block Image Request

Avatar

Level 3

We have a 3rd party security scanner tool that crawls our site.  They are filtered out of our data set using our bot rules.  However, we are still billed for all of the server calls even though the traffic is flagged as a bot.  Is there anyway to turn off the image request so we will not be billed for the server calls it generates? 

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi Eric,

You would have to write some custom code in your s_code file that aborts the request.

You would also need to access some flag from javascript that distinguishes the scanner from a real visitor.  I'm not sure if you can configure your scanner tool to set any cookies or make any data available to the javascript context.  If you can, then it would work like this:

Probably in doPlugins, you would write some condition:

if (/* cookie is set, or javascript that distinguishes your scanner is true */) { s.abort = true; }

Thanks,

Ben

View solution in original post

1 Reply

Avatar

Correct answer by
Employee

Hi Eric,

You would have to write some custom code in your s_code file that aborts the request.

You would also need to access some flag from javascript that distinguishes the scanner from a real visitor.  I'm not sure if you can configure your scanner tool to set any cookies or make any data available to the javascript context.  If you can, then it would work like this:

Probably in doPlugins, you would write some condition:

if (/* cookie is set, or javascript that distinguishes your scanner is true */) { s.abort = true; }

Thanks,

Ben