my mp2 needs to get the ip of the remote address on some installations, mp2 is on port 80 on other installations, mp2 is on 80xx and the ip is in X-Forwarded-Fori'd like to ensure that i pull the ip off the right place, under the right conditions. all of my get_ip() calls happen in a shared library though, so I need to figure out a way to handle this under those constraints, and not deal with spoofs.
first i found this module Apache::ForwardedForhttp://search.cpan.org/~jlawrenc/Apache-ForwardedFor-0.5/lib/Apache/ ForwardedFor.pm
but its Apache1 not porting nicely designed oddly- doesn't seem to forwshort of rewriting it , which i might have to do, maybe someone has an apach2 compatible solution already?
i'm thinking that the easiest way to do this would be: httpd.conf-run a preliminary handler that strips all x-forwarded-for headers unless:
we're running on port 80we're running on port 80 but there's some internal lan header marking that says its coming off a load balancer i control
although i could just do a conditional rewrite of headers in a new forwarded module
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.