Forum Discussion
Dan_Markhasin_1
Nimbostratus
Jul 05, 2015Rewrite host header to selected member name?
Hi,
I'm trying to create a rule that would rewrite the host header of the request to the actual name of the selected pool member (not its IP address).
The reason I am trying to do this is to loa...
Kevin_Stewart
Employee
Jul 05, 2015I'd probably start by asking where would you get the name information from? Reverse DNS? Or a local mapping?
The first option is a bit more involved and would of course incur some latency, but the second option is relatively straight forward if you maintain an IP-to-hostname mapping in a datagroup.
when HTTP_REQUEST {
HTTP::header replace Host [class lookup [LB::server addr] my_host_datagroup]
}
You might also add a check to make sure the mapping information exists in the datagroup, before trying to replace the Host header, but hopefully this should give you a good idea how it could work.
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