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

From: Chris Robertson <crobertson@dont-contact.us>
Date: Tue, 06 Jun 2006 13:26:02 -0800

mickymax@gmx.de wrote:

>Hi,
>
>does anybody know if it is possible to access the X-Forwarded-Header inside of a rewriter script (squid used as reverse proxy). AFAIK, there is only the ip-address of the requesting server available which may be the ip of another cache-server.
>
>Background: We have another external cache server that queries our squids and we want to pass the client ip to an external script which makes decisions about the client ip: e.g. redirection to a special url if certain ips are there.
>I know that it is easy to trick the x-forwarded-header to fake ips, but nevertheless.
>
>if I use something like external_acl %SRC with an external script I can only say:OK or ERR, i.e. access or not. But I want to give the client different urls back depending on its ip.
>
>Or is there any other possibility to make such decisions (with the x-forwarded-for header information) outside the redirect script?
>
>thx in advance,
>max
>
>
http://devel.squid-cache.org/projects.html#follow_xff might be just what
you are looking for. Be aware that development patches are not
supported and may set your hair on fire. Also, be aware:

This patch changes the "configure.in" file, which is an input to
"autoconf". You must run "bootstrap.sh" after applying this patch, and
that will run "autoconf" for you. "autoconf" will generate a new
"configure" script, which will have the new
"--enable-follow-x-forwarded-for" option.

Chris
Received on Tue Jun 06 2006 - 15:26:12 MDT

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