Re: ForwardFor Option Not Working?

From: Willy Tarreau <w#1wt.eu>
Date: Tue, 19 May 2009 06:22:44 +0200


Hi Michael,

On Mon, May 18, 2009 at 04:21:14PM +0000, Michael Tinnion wrote:
>
> Hi,
>
>
>
> I've very limited experience with HAProxy and I'm trying to get the ForwardFor option to work but with no joy.
>
>
> I've set the following in my 'listen' section
>
>
>
> option httpclose
> option forwardfor
 

indeed, that's the correct way to do it.

> and I have set the following in my tomcat (hosted by JBoss) configuration:
>
>
>
> maxKeepAliveRequests="1"
>
>
>
> According to everything I have read this should make HAProxy add the X-Forwarded-For header to the requests. Unfortunately I am still not seeing this and the client IP address in the request has been set to that of the load balancer.

Well, since almost everyone is using it, I don't really believe it does not work. Are you sure you have "mode http" in your "listen" section ? Also, how are you checking that the header is correctly added ? Maybe you just mis-wrote its name where you check it ?

Regards,
Willy Received on 2009/05/19 06:22

This archive was generated by hypermail 2.2.0 : 2009/05/19 06:30 CEST