X-Forwarded-For where?
יריב הראל
YARIV-H at yit.co.il
Wed Sep 3 07:50:30 CEST 2014
Hi ,
X-Forwarded-For will contain all ip addresses used to access your server from the outside (client > proxy > cdn > varnish > your web server)
The address varnish is seeing as source ip is the cdn server ip .
Most cdn networks have a special header custom for them that shoes the client ‘s real ip , you should use that header.
[yariv_sig_outlook]
From: varnish-misc-bounces+yariv-h=yit.co.il at varnish-cache.org [mailto:varnish-misc-bounces+yariv-h=yit.co.il at varnish-cache.org] On Behalf Of Hern?n Marsili
Sent: Wednesday, September 03, 2014 4:25 AM
To: varnish-misc
Subject: X-Forwarded-For where?
Hi,I need to obtain the real ip the the client, not the ip of the CDN service.
I found example with this on the vcl_recv. Others with similar code o the vcl_miss and similar code on vcl_deliver.r
remove req.http.X-Forwarded-For;
set req.http.X-Forwarded-For = req.http.rlnclientipaddr;
I try them all, all of them work. But, which is the most efficient way? :)
Saludos,
Hernán.
[Banner]<http://my.ynet.co.il/short/content/2013/ynetnewsletter/index_2.aspx>
Powered by U‑BTech XTRABANNER<http://www.u-btech.com/products/xtrabanner/poweredby>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20140903/948e444d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 10506 bytes
Desc: image001.jpg
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20140903/948e444d/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Banner1-d236.jpg
Type: image/jpeg
Size: 50706 bytes
Desc: Banner1-d236.jpg
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20140903/948e444d/attachment-0003.jpg>
More information about the varnish-misc
mailing list