Mailing List Archive

Cookie and X-FOrwarded-For
Thanks for your help on caching php, but now I have another problem.
When I do a request with a cookie the X-Forwarded-For is not set.

C?dric
Cookie and X-FOrwarded-For [ In reply to ]
Cedric Tabary <tabary at efrei.fr> writes:
> Thanks for your help on caching php, but now I have another problem.
> When I do a request with a cookie the X-Forwarded-For is not set.

If you're running 1.0.1, it's a known bug that has been fixed in
trunk.

DES
--
Dag-Erling Sm?rgrav
Senior Software Developer
Linpro AS - www.linpro.no
Cookie and X-FOrwarded-For [ In reply to ]
On 13/10/2006 10:50, Dag-Erling Smrgrav wrote:
> Cedric Tabary <tabary at efrei.fr> writes:
> > Thanks for your help on caching php, but now I have another problem.
> > When I do a request with a cookie the X-Forwarded-For is not set.
>
> If you're running 1.0.1, it's a known bug that has been fixed in
> trunk.

Strange because I was running trunk.

/usr/local/varnish/sbin/varnishd -a '0.0.0.0:80' -b'127.0.0.1:8080' -T
127.0.0.1:1664 -sfile,/tmp/varnish,1g -t 0

I added this in PassSession() in cache_pass.c
http_PrintfHeader(w, vc->fd, vc->http,
"X-Forwarded-for: %s", sp->addr);

I don't know if it is the right place but it worked for me :)

C?dric