Source: Varnish Software Blog

Varnish Software Blog Handling the X-Forwarded-For Header

When you send an HTTP request to a server, it’s unlikely that you are talking to it directly. Rather, you are sending the request to a proxy that will choose a recipient and forward said request to it. That’s especially true for CDN and other caching tools, such as Varnish.However, origin servers often like to know which IP address sent them the request. It could be they want to collect statistics, or they need to locate them in the world, or maybe there’s some regulation that forces them to log that original IP. That’s a bit of an issue though as HTTP reverse proxy will create their own connections to the origin, and therefore use their own IP address, meaning the origin can’t use the TCP data anymore to identify the original caller.But of course, we have a solution to fix this problem! Well, we even have two, but the first and most prominent one is the X-Forwarded-For (XFF for short) header, and it’s the subject of today’s post!

Read full article »
Est. Annual Revenue
$5.0-25M
Est. Employees
100-250
Fredrik Borg's photo - CEO of Varnish Software

CEO

Fredrik Borg

CEO Approval Rating

90/100

Read more