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 developers want to know which stack is active.
So ideally they have asked if we can output a header either a 1 or 0 depending on which stack/pool member the request is load balanced to.
I know i can match the pool member out of an data class but i am not sure of the syntax/variable that will allow me to check/log the member that the request was load balanced too.
Thanks
- The_Bhattman
Nimbostratus
Hi Tidenz, - hoolio
Cirrostratus
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]" }
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