Forum Discussion
Alexis_Bykov_13
Nimbostratus
Nov 27, 2013How-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?
8 Replies
- Thomas_Gobet_91
Cirrostratus
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]" }- Alexis_Bykov_13
Nimbostratus
I need to insert this info to HTTP Header only for some servers, not for all - Alexis_Bykov_13
Nimbostratus
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]} }
- Thomas_Gobet
Nimbostratus
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]" }- Alexis_Bykov_13
Nimbostratus
I need to insert this info to HTTP Header only for some servers, not for all - Alexis_Bykov_13
Nimbostratus
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]} }
- Thomas_Gobet
Nimbostratus
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]" } - Thomas_Gobet
Nimbostratus
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 ?
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