Forum Discussion
Brian_Ott_11267
Nimbostratus
Jul 29, 2007host header inspection
I want to do host header inspection to decide which pool to send traffic to. For example create one VIP that has multiple domain names tied to it, say:
disney.apple.com 10.2.2.4
pi...
hoolio
Cirrostratus
Jul 29, 2007You can use the pool command with the Host header value in combination with the catch command to capture errors.
Here is an example that logs to /var/log/ltm:
when HTTP_REQUEST {
log local0. "client: [IP::client_addr] -> [HTTP::host][HTTP::uri]"
if { [catch { pool [HTTP::host]}] }{
log local0. "pool [HTTP::host] doesn't exist!"
pool default_pool
}
}'pool [HTTP::host]' will specify the value of the Host header as the pool. If the pool doesn't exist, it will generate an error which 'catch' will catch and return true. If catch returns true, then the default pool will be used.
Aaron
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
