Daniel Minnaar
Daniel Minnaar

Reputation: 6315

How can I override HTTP headers on IIS level?

I've got a load balancer, x, and two servers (a, b). A and B run IIS, and the same WCF service runs on both.

If I call the web service via the load balancer, x, then I receive a response from either a or b. The problem is that only x's IP address is shown as the remotehost header on the response, and not the actual server that generated it (either a or b).

If there's currently no other header that does contain the specific source address, can I configure IIS on a and b to include a custom header with this information? How do I go about doing this?

Upvotes: 1

Views: 2506

Answers (1)

Alex Gidan
Alex Gidan

Reputation: 2679

  1. Launch the Internet Information Services (IIS) Manager
  2. Expand the Web Sites folder
  3. Right-click on the website to modify and choose Properties from the context menu
  4. Select the HTTP Headers tab.

The Custom HTTP Headers box lists all of the HTTP Headers IIS will include on each response (see the screen shot below).

You can find more info in the official doc (the link is about removing custom headers, but it can help you also to add/modify them.

Upvotes: 2

Related Questions