Hi, Not doable in 1.4. In 1.5, a http-request could do the trick: http-request set-header X-Real-IP %[src]
Just play with ACLs to set it when you need. Baptiste On Mon, Mar 10, 2014 at 12:09 PM, r0m5 <[email protected]> wrote: > Hi, > > I am using haproxy package from debian Wheezy backports (1.4.24-2~bpo70+1). > I'd like to set two headers with forwardfor information : always add a > X-Forwarded-For header and also add a X-Real-IP header if and only if it > does not already exists. > > So I tried this in my listen block : > > option forwardfor header X-Real-IP if-none > option forwardfor > > The thing is only the last "option forwardfor" statement is applied, so I > succeeded in setting only one of the two headers. > > Do you know if there is a way I could succeed in setting both headers ? > > Regards, > >

