Hi
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.