How-to include IP address(es) of some balanced Web Servers into HTTP Header?

What iRules I will use to include information about IP address(es) of some balanced Web Servers into HTTP Header?

Hi,

Here is an iRule to include Web servers adresses into the header.

when HTTP_RESPONSE {
HTTP::header insert Server_IP "[IP::server_addr]:[TCP::server_port]"
}

Hi,

Here is an iRule to include Web servers adresses into the header.

when HTTP_RESPONSE {
HTTP::header insert Server_IP "[IP::server_addr]:[TCP::server_port]"
}

I need to insert this info to HTTP Header only for some servers, not for all

I need to insert this info to HTTP Header only for some servers, not for all

You can create a data group with all servers for which you want to insert this information.

Then when your data group is created, your iRule will be :

when HTTP_RESPONSE {
if { [class match [IP::server_addr] equals my_ip_datagroup] } {
    HTTP::header insert Server_IP "[IP::server_addr]:[TCP::server_port]"
}

Can I use following iRule for pool which has name Pool_Name?: when HTTP_RESPONSE{ if {pool } {HTTP::header insert Server_IP [IP::server_addr]} }

Can I use following iRule for pool which has name Pool_Name?: when HTTP_RESPONSE{ if {pool } {HTTP::header insert Server_IP [IP::server_addr]} }

Here is an iRule with the condition based on the pool choosen :

when HTTP_RESPONSE {
if { [LB::server pool] equals your_pool_name } {
    HTTP::header insert Server_IP "[IP::server_addr]:[TCP::server_port]"
}

Is your iRule going to be applied on multiple virtual servers ?