Forum Discussion
Robert_47833
Altostratus
May 15, 2013class match [HTTP::header values "X-Forwarded-For" contains datagroup has issue?
class datagroup {
{
"108.4.7.10"
"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.6 (KHTML, like Gecko) Chrome/20.0.1092.0 Safari/536.6"
"Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.18) Gecko/20110619 Firefox/3.6.18 (Palemoon/3.6.18)"
"Mozilla/6.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3"
}
}
~
if {[class match [HTTP::header values "X-Forwarded-For"] contains datagroup]} {
irule above break traffic when I submit it,not sure why
1 Reply
- What_Lies_Bene1
Cirrostratus
Why would you have user agent strings in that data group?
This should help (values returns a list which you don't want, equals would be better for something like this, -- avoids any hyphens in the DG strings confusing Tcl)if {[class match -- [HTTP::header "X-Forwarded-For"] equals datagroup]} {
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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