Forum Discussion
JamesS_40157
Dec 20, 2011Nimbostratus
Disable web scraping detection per geolocation?
Hi, I was wondering if it's possible to disable web scraping detection based on geolocation? We have web scrapers trying to get to our site from all over the world, however they mostly appea...
Mike_Maher
Dec 20, 2011Nimbostratus
So from an iRule perspective, I think something as simple this should work
when HTTP_REQUEST {
if {[whereis [IP::client_addr]] contains "US"} {
HTTP::class select webscraping_disable_class
} else {
HTTP::class select webscraping_enable_class
}
}
If you are just looking to white list one country and send everyone else to the other class. If you have list of countries you want to white list or black list though, you will want to create a data list first perhaps named Country_List and then reference that list like below.
when HTTP_REQUEST {
if {[whereis [IP::client_addr]] contains $::Country_List} {
HTTP::class select webscraping_disable_class
} else {
HTTP::class select webscraping_enable_class
}
}
Hope this helps.
Mike
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects