[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: X_FORWARDED_FOR original IP


On Fri, 2007-08-03 at 20:02 +0800, Jen mlists wrote:
> No.Here both PHP and CGI scripts can get the X_FORWARDED_FOR ip,but
> modperl can't.Is the %ENV hash not useful under modperl?

No it's not - mod_perl has access to all of that (plus a whole lot more)
via other means, so apache doesn't need to set up the environment for
every request.

As Torsten said, you can access the X-forwarded-for headers with this:

    $r->headers_in->{$header_name}

Clint


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.