Forum Discussion
Therap_Ops_1222
Nimbostratus
Jul 23, 2013Add Server ID in Response Header
I've 4 app servers running behind the LTM. I was able to insert server's IP address and port number with the following iRule.
when HTTP_RESPONSE {
HTTP::header insert SERVER_AD...
Kevin_Stewart
Employee
Jul 23, 2013Off the top of my head I don't believe an iRule has access to an assigned node "name". You could potentially do a reverse DNS lookup of the server to get its host name, but the simplest option given that you only have 4 app servers, is to create a string-based data group. Example:
Data group "server_dg"
10.10.10.1 := server1
10.10.10.2 := server2
10.10.10.3 := server3
10.10.10.4 := server4
And an iRule something like this:
when HTTP_RESPONSE {
HTTP::header insert SERVER_ADDRESS [class lookup [IP::server_addr] equals server_dg]
}
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