Forum Discussion
JAIME_QUIROGA_1
Jul 23, 2014Nimbostratus
CHANGE THE HOST NAME IF THE CONNECT IS A POOL MEMBER
Hi
I need to change the hostname for "server1" if the connect is a pool member X and "server2" if the pool member is Y. In this case the client set the URL http://caso.com/ejemplo and the sessio...
Kevin_Stewart
Jul 23, 2014Employee
You'll want to use either the HTTP_REQUEST_SEND or HTTP_REQUEST_RELEASE events, as these are triggered after the load balancing decision. Here's an example:
when HTTP_REQUEST_RELEASE {
switch [LB::server addr] {
"10.70.0.1" {
HTTP::header replace Host "server1.internal.local"
}
"10.70.0.2" {
HTTP::header replace Host "server2.internal.local"
}
}
}
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