X-Git-Url: http://git.jankratochvil.net/?p=MyWeb.git;a=blobdiff_plain;f=Web.pm;h=b166e7611777113a0d4620d607c1fdcfeb55e52e;hp=f6c9a79a3ff7e0806b66806029801f018f2ec167;hb=d283af4f7bd7659deae058ab1e07ee06ffd114b8;hpb=54e2991bea930095e7f7ab4f033b387a11a03898 diff --git a/Web.pm b/Web.pm index f6c9a79..b166e76 100644 --- a/Web.pm +++ b/Web.pm @@ -287,7 +287,7 @@ sub remote_ip () # As 'Apache::ForwardedFor' takes the first of $ENV{"HTTP_X_FORWARDED_FOR"} # while the contents is '127.0.0.1, 213.220.195.171' if client has its own proxy. # We must take the last item ourselves. - my $r=$ENV{"HTTP_X_FORWARDED_FOR"}; + my $r=$ENV{"HTTP_X_FORWARDED_FOR"} || $W->{"r"}->remote_host(); $r=~s/^.*,\s*//; return $r; }