[squid-users] Re: X-Forwarded-For Header and Rewriter

From: Joost de Heer <sanguis@dont-contact.us>
Date: Fri, 9 Jun 2006 12:48:32 +0200 (CEST)

mickymax@gmx.de wrote:
> Hi,
>
> I took a look at the follow_xff patch, but will the ip-address information
> I get in an url rewriter (squid as reverse proxy with redirect script) be
> the one of the client or the one of the other cache-proxy that send its
> request to squid?
> due to the documentation, it seems as if I only use the patch to have a
> new acl directive follow_x_forwarded_for.
>
> but I would like to start a script to check the original client ip, e.g.
> inside of the redirect script, and then to redirect him to a special url.
>
> is this possible?

If the request includes the 'X-Forwarded-For' header, then the patch will
use the value in that header for acls, if it doesn't (i.e. direct client
access, or a proxy/loadbalancer that's configured not to include this
header) then the actual connecting IP address will be used.

You can't find the original IP address if it's not included in the request
headers.

Joost
Received on Fri Jun 09 2006 - 04:48:35 MDT

This archive was generated by hypermail pre-2.1.9 : Sat Jul 01 2006 - 12:00:01 MDT