Jean_Mamène
Jun 25, 2019Cirrus
Rewrite HTTP host based on server name loadbalanced
Hi all,
My application is not compatible with the reverse proxy.
I have 2 servers in my pool.
I need to replace the http host with the name of the server loadbalanced.
I try this iRule
when HTTP_REQUEST_SEND {
clientside {
if {[HTTP::host] equals "bi.test.com"} {
HTTP::header replace Host "[class match -value [LB::server addr] equals test-datagroup]"
}
}
}
test-datagroup:
1.1.1.1 := "server1.test.local",
1.1.1.2 := "server2.test.local",
but when I try the URL I have a response but only the uri https://hub and not https://bi.test.com/hub
Regards