Forum Discussion
tidenz_92110
Nimbostratus
May 31, 2011Insert header into response based on pool selected in request.
Hi Guys,
I am looking for a way to insert a header into the response based on the pool member selected in the request.
The scenario is we are implementing service stacks and the d...
You could do this in HTTP_RESPONSE. Here's a simple example which inserts the server IP:port in a header named SERVER_INFO:
when HTTP_RESPONSE {
HTTP::header insert SERVER_INFO "[IP::server_addr]:[TCP::server_port]"
}
If you wanted to map the server IP:port to a name or some other value, you could create the mapping in a string datagroup and then use the class command (in v10) or the findclass command (in v9) to do the lookup.
Aaron
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