Forum Discussion
Bret_McGinnis_1
Nimbostratus
Aug 22, 2005user_agent field in the http header
I would like to use the user_agent field to determine which pool a request goes to. Is there an easy or perfered way to access the user_angent field.
I looked at the doc and searched the fo...
Colin_Walker_12
Aug 24, 2005Historic F5 Account
For this you would use the "contains" operator. This returns a positive on the match regardless of the positioning of the string you're searching for within the header.
when HTTP_REQUEST {
if{ HTTP::header "User-Agent"] contains "test" } {
pool testpool
}
}
This would match test anywhere inside the User-Agent header. So the code Joe provided would work just fine.
Hope this helps,
-Colin
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