Forum Discussion
- Krystian_BaniakAltocumulus
Hi,
you will be able to do it when: * split HTTP User-Agent string into tcl list * for given set of Browsers (like Chrome) parse version list element to a float: version.minor_version * use <= on such a data, even using a data-group holding rules definitions:
Hi Sys-team,
I'm afraid, you can't block user-agents by using a "version < X" syntax. You have to block them one-by-one by using
wildcard matches.-glob
Example to block Internet Explorer below v11:
when HTTP_REQUEST { switch -glob -- [HTTP::header value "User-Agent"] "*MSIE 2*" - "*MSIE 3*" - "*MSIE 4*" - "*MSIE 5*" - "*MSIE 6*" - "*MSIE 7*" - "*MSIE 8*" - "*MSIE 9*" - "*MSIE 10*" { HTTP::respond 200 content "Unsupported Brwoser" } }
Note: A great source for user-agent string values can be found here... http://www.useragentstring.com/pages/useragentstring.php
Cheers, Kai