Rewriting the X-Forwarded-Host Field
Rewriting the X-Forwarded-Host header of the client allows ELB to add the host information in the request header of the client to the X-Forwarded-Host header and transmits the request to backend servers.
Scenarios
When you add an HTTPS or HTTP listener to a load balancer, the function of rewriting the X-Forwarded-Host header field is enabled by default.
This function allows ELB to rewrite the X-Forwarded-Host header field based on the Host field in the client request and transmit the rewritten header to backend servers.
You can disable it at any time if you no longer need it. The following are operations for disabling this function on the management console.
This function is available only for HTTP and HTTPS listeners.
Disabling the Function
- Log in to the management console.
- In the upper left corner of the page, click and select the desired region and project.
- Hover on in the upper left corner to display Service List and choose Network > Elastic Load Balance.
- In the load balancer list, locate the load balancer and click its name.
- Click the Listeners tab, identify the row where the target listener is located, and click Edit in Operation column.
- Expand Advanced Settings and disable Rewrite X-Forwarded-Host.
- You can also disable it when adding an HTTP or HTTPS listener. For details, see Adding an HTTP Listener and Adding an HTTPS Listener.
- If you want to enable this function after you have disabled it, perform the above steps.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.