Forum Discussion
nathe
Nov 18, 2015Cirrocumulus
You wouldn't need switch then (untested irule below):
when HTTP_REQUEST {
log local0. "lbserveraddr: [LB::server addr]"
check if serverside connection had previously been established
if { [LB::server addr] eq "" }{
if no serverside connection had previously been established, force one
so the iRule has the info required to insert a destination-specific header
eval [LB::select]
}
set port [LB::server port]
HTTP::header replace Host "[HTTP::host]:$port"
}