I guess this is mod_perl.
In your startup.pl, put
Code:
use Apache::Constants ();
sub My::ProxyRemoteAddr ($) {
my $r = shift;
# we'll only look at the X-Forwarded-For header if the requests
# comes from our proxy at localhost
return Apache::Constants::OK
unless ($r->connection->remote_ip eq "127.0.0.1")
and $r->header_in('X-Forwarded-For');
# Select last value in the chain -- original client's ip
if (my ($ip) = $r->headers_in->{'X-Forwarded-For'} =~ /([^,\s]+)$/) {
$r->connection->remote_ip($ip);
}
return Apache::Constants::OK;
}
Then, in your modperl.conf file, put
Code:
PerlPostReadRequestHandler My::ProxyRemoteAddr
I hope that helps.
Ivan
-----
Iyengar Yoga Resources /
GT Plugins