perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jen mlists" <practicalp...@gmail.com>
Subject X_FORWARDED_FOR original IP
Date Fri, 03 Aug 2007 10:29:39 GMT
Hello members,

I meet a problem about getting client's original IP.
Some clients use proxy servers to access our sites,and I need to get
their original IPs instead of proxy servers' IPs.

In CGI I can write it like:

my $ip = $ENV{'HTTP_X_FORWARDED_FOR'} ? $ENV{'HTTP_X_FORWARDED_FOR'} :
$c->remote_ip;

but now I'm running under pure mod_perl (mp1),this can't work.
the configure is:

PerlModule DLAuth

<Location /path>
    SetHandler perl-script
    PerlAccessHandler DLAuth
</Location>


please help me.Thanks!

Mime
View raw message