Problem with X_FORWARD_FOR

Rodrigo Violante rodrie.violante at gmail.com
Mon May 24 19:45:28 CEST 2010


I made a test to check my IP and sometimes it shows it sometimes it doesnt, I already checked if it was cached, but it wasnt, I made a change to the vcl_recv

    if (req.http.x-forwarded-for) { 
 		        set req.http.X-Forwarded-For =  req.http.X-Forwarded-For ", " client.ip; 
 		    } else { 
 		        set req.http.X-Forwarded-For = client.ip; 
 		    } 

It didnt work so I did this one:

> sub vcl_recv {
>  # Add a unique header containing the client address
>  remove req.http.X-Forwarded-For;
>  set    req.http.X-Forwarded-For = client.ip;
>  # [...]
> }

And still had no luck at all. 

Its random sometimes it shows the user ip sometimes it doesnt.

Any clues?

Rodrigo Violante
Team Manager
Solo Racing
rodrigo at soloracing.com
http://www.linkedin.com/in/rodrigoviolante
http://twitter.com/rodriev
Mobile MEX: +52 1(554) 611 35 32


This e-mail message is intended only for the personal use of the recipient(s) named above. This message may be an attorney-client communication and as such privileged and confidential.  If you are not an intended recipient,you may not review, copy or distribute this message. If you have received this communication in error, please notify us immediately by e-mail and delete the original message.
PPlease consider the environment before printing email

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-bugs/attachments/20100524/38fb7f07/attachment.html>


More information about the varnish-bugs mailing list