From acfdbf4f86dced354dee9c9ef90041012a72968e Mon Sep 17 00:00:00 2001 From: Chris Sharp Date: Wed, 24 Jan 2018 12:34:46 -0500 Subject: [PATCH] fix IP redirection by pulling the X-Real-IP header --- Open-ILS/src/perlmods/lib/OpenILS/WWW/Redirect.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/Redirect.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/Redirect.pm index c0533dbff5..b2dda544e0 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/Redirect.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/Redirect.pm @@ -58,7 +58,7 @@ sub handler { my $cgi = CGI->new( $apache ); my $hostname = $cgi->server_name(); my $proto = ($cgi->https) ? 'https' : 'http'; - my $user_ip = $ENV{REMOTE_ADDR}; + my $user_ip = $apache->headers_in->{'X-Real-IP'}; # Extract the port number from the user requested URL. my $port = ''; -- 2.11.0