Posted By hoolio on 11/29/2010 08:02 AM
Hi K-Dubb,
You can use an iRule like this:
From http://devcentral.f5.com/wiki/default.aspx/iRules/http_request_send
when HTTP_REQUEST_SEND {
Need to force the host header replacement and HTTP:: commands into the clientside context
as the HTTP_REQUEST_SEND event is in the serverside context
clientside {
Replace (or insert if it doesn't exist) a custom HTTP header with the selected server IP and port
HTTP::header replace my_custom_header "[IP::server_addr]:[TCP::server_port]"
}
}
You could also insert the currently selected pool name using [LB::server pool].
Aaron
Hi,
Thanks for your reply! Is server_addr and Server_port a method, or do I need to populate this with the actual IP and Port? The reason I ask is because the iRules are applied at the Virtual Server level and with 14 application servers, I am not sure how it would inject the correct IP and port to the server.