Apache2::Connection::XForwardedFor - Sets the connection remote_ip to X-Forwarded-For header
PerlPostReadRequestHandler Apache2::Connection::XForwardedFor
Meanwhile in another mod_perl handler...
$client_ip = $r->connection->remote_ip;
This simple module takes the X-Forwarded-For header value and sets the remote_ip attribute of the connection object with that ip. This module is meant to be used with reverse proxies where the proxy sets the header to the ip of the http client.
This module doesn't have any fancy features like similar modules, it is meant to be short and to the point, and have some test coverage.
Apache2::Connection
Apache2::XForwardedFor
Apache::ForwardedFor
Fred Moyer, <fred@redhotpenguin.com>
Copyright (C) 2010 by Fred Moyer
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.12.0 or, at your option, any later version of Perl 5 you may have available.
To install Apache2::Connection::XForwardedFor, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Apache2::Connection::XForwardedFor
CPAN shell
perl -MCPAN -e shell install Apache2::Connection::XForwardedFor
For more information on module installation, please visit the detailed CPAN module installation guide.