Forum Discussion
jampa
Nimbostratus
Oct 10, 2019Radware-F5 migration
Hello to all I need an iRule for F5. I'm doing a migration from the Radware load balancer to F5, in this farm there's this writing: / c / slb / layer7 / httpmod Proxy_mstr_cnhind_com ...
iaine
Nacreous
Oct 11, 2019Hi
This reads to me like you are just inserting the X-Forwarded-Host and X-Forwarded-Server headers. If so then this would work
when HTTP_REQUEST {
HTTP::header insert "X-Forwarded-Host" "mstr.cnhind.com"
HTTP::header insert "X-Forwarded-Server" "mstr.cnhind.com"
}You could refine this to check the Host header first.
when HTTP_REQUEST {
if {[HTTP::header host value] eq "mstr.cnhind.com"} {
HTTP::header insert X-Forwarded-Host "mstr.cnhind.com"
HTTP::header insert X-Forwarded-Server "mstr.cnhind.com"
}
}The line to replace the Host header looks redundant to me as it's not changing the value of the header.
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
