In IIS 8.5 I am using URL rewrite to forward the request to an external server (in server farm).
The problem is that rewrite is adding the Host
header to the request to the external server, which is causing that server to respond with an error.
Testing manually with Postman, I can see that if I send a request to the external server with a Host
header, I get the same error (even if value is blank). Removing the Host
header will give a successful response.
How do I remove the Host
header from the forwarded request to the external server?
I've seen questions and answers regarding removing the headers from the response. However these either are not applicable or dont work with respect to forwarded request headers.