Hi Maik,
On Tue, Jul 28, 2009 at 12:31:23AM +0200, Maik Broemme wrote:
> Hi,
>
> is it possible to set the listen address of HAProxy as an HTTP-Request
> Header? For example if you have HAProxys running on multiple servers and
> balance the requests to multiple backend servers, which have a NAT router
> between HAProxys and backend servers, it would be very nice to have a
> header like 'X-Forward-Via' or 'X-Forward-From'. Did someone know if
> this is possible?
you have two possibilities :
- you know each one of your haproxy servers, so you configure them
to simply add a Via header (using reqadd with their name). Eg:
reqadd Via:\ haproxy1
- you just want to forward the address the client connected to,
which should match the listen address when there's only one
listen address. Then you can enable "option originalto" which
you contributed, and get this IP address in the "x-original-to"
header.
Hoping this helps,
Willy