[EMAIL PROTECTED] 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