Forum Discussion
dhotman_22537
Nimbostratus
Feb 17, 2011RDP Load balancing (pool routing) based on user or hostname
Hi everyone, We have a Microsoft TS cluster of 4 machines with a session directory and load balancing across this cluster is handled by our LTM. Everything works really well and overall we ...
Michael_Yates
Nimbostratus
Sep 19, 2011I would suggest using a Switch Statement rather than nested If Statements for efficiency and inside of your default behavior put a logging statement that you can enable periodically to see what other types of browsers are hitting your Virtual Server (or if you want to identify one to add it to your switch statement). When not in use you can disable it.
when HTTP_REQUEST {
switch -glob [HTTP::header User-Agent] {
"*MSIE*" { do something }
"*Firefox*" { do something }
"*Chrome*" { do something }
default {
log local0. "Unhandled User Agent: [HTTP::header User-Agent]"
}
}
}
Hi Eric,
the iRule looks very valid. Could be the case that a leading or trailing line may cause this issue...
So clear the content of your existing iRule using STRG+A -> STRG-X and then STRG-C -> STRG-V the iRule below...
when HTTP_REQUEST { if { [SSL::cert count] > 0 } then { set clientcert [SSL::cert 0] set clientdn [X509::subject [SSL::cert 0]] set clientserial [X509::serial_number [SSL::cert 0]] HTTP::header insert XClientCert [b64encode $clientcert] HTTP::header insert XClientDN $clientdn HTTP::header insert XClientSerial $clientserial } }
Cheers, Kai
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