Page MenuHomeVyOS Platform

Implement HAproxy X-Forwarded-For http header
Closed, InvalidPublicFEATURE REQUEST

Description

Summary

Add a feature in the load-balancing haproxy that enables the X-Forwarded-For http header on the backend service.

*Use case**

X-Forwarded-For http header is useful to keep track of real IP of client even when it traverses a reverse proxy.

Additional information

https://www.haproxy.com/documentation/haproxy-configuration-tutorials/proxying-essentials/client-ip-preservation/add-x-forward-for-header/

Details

Version
-
Is it a breaking change?
Perfectly compatible
Issue type
Internal change (not visible to end users)

Event Timeline

Viacheslav triaged this task as Wishlist priority.Jun 4 2025, 12:11 PM
Viacheslav subscribed.

Any idea for CLI?

Well, it could be an option in the load-balancing haproxy service definition, something like "option forwardedfor" that would enable the http header and feed it with real client IP.

You're right, headers for port and protocol are being added but not the host.

I'm speaking about the X-Forwarded-For http header, see Mozilla reference for example.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Forwarded-For

Sorry, my bad, capturing traffic send from the haproxy to the backend actually contains the X-Forwarded-For header. Simply close my request and thanks for the quick answer / interaction.

image.png (743×1 px, 125 KB)