--- loncom/lontrans.pm 2020/12/23 22:03:42 1.28 +++ loncom/lontrans.pm 2021/01/05 04:23:45 1.29 @@ -1,7 +1,7 @@ # The LearningOnline Network # URL translation for User Files # -# $Id: lontrans.pm,v 1.28 2020/12/23 22:03:42 raeburn Exp $ +# $Id: lontrans.pm,v 1.29 2021/01/05 04:23:45 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -58,15 +58,15 @@ sub handler { my $hostname = &Apache::lonnet::hostname($lonhost); if (($hdrhost eq $alias) || ($hdrhost eq $hostname)) { my $proxyinfo = &Apache::lonnet::get_proxy_settings($r->dir_config('lonDefDomain')); - my ($vpnpriv,$vpnnat); + my ($vpnint,$vpnext); if (ref($proxyinfo) eq 'HASH') { - $vpnpriv = $proxyinfo->{'exempt'}; - $vpnnat = '35.12.16.96-35.12.16.111'; + $vpnint = $proxyinfo->{'vpnint'}; + $vpnext = $proxyinfo->{'vpnext'}; } my $redirect; if ($hdrhost eq $alias) { my $remote_ip = &Apache::lonnet::get_requestor_ip($r,REMOTE_NOLOOKUP); - if ($vpnnat && &Apache::lonnet::ip_match($remote_ip,$vpnnat)) { + if ($vpnext && &Apache::lonnet::ip_match($remote_ip,$vpnext)) { $redirect = $hostname; if ($redirect eq $hdrhost) { undef($redirect); @@ -74,9 +74,9 @@ sub handler { } } elsif ($hdrhost eq $hostname) { my $remote_ip = &Apache::lonnet::get_requestor_ip($r,REMOTE_NOLOOKUP,1); - unless (($remote_ip eq '127.0.0.1') || + unless (($remote_ip eq '127.0.0.1') || ($remote_ip eq '::1') || ($remote_ip eq &Apache::lonnet::get_host_ip($lonhost)) || - ($vpnpriv && &Apache::lonnet::ip_match($remote_ip,$vpnpriv))) { + ($vpnint && &Apache::lonnet::ip_match($remote_ip,$vpnint))) { $redirect = $alias; if ($r->uri=~m{^/raw/}){ my %iphost = &Apache::lonnet::get_iphost(); 500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.