Forum Discussion
knight207_63919
Sep 19, 2011Nimbostratus
Proxy outbound HTTP base on User Agent
I am somewhat new to iRules so this is my first go.
I want to send outbound HTTP requests from certain browers to proxy servers using the user agent. Anything not matching should just forwar...
hooleylist
Sep 19, 2011Cirrostratus
Nice one Michael. You could also set the User-Agent header to lower case to avoid case issues:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::header User-Agent]] {
"*msie*" { do something }
"*firefox*" { do something }
"*chrome*" { do something }
default {
log local0. "Unhandled User Agent: [HTTP::header User-Agent]"
}
}
}
Aaron
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