Diff for /loncom/lontrans.pm between versions 1.30 and 1.34

version 1.30, 2021/04/18 02:08:46 version 1.34, 2021/08/08 20:51:33
Line 67  sub handler { Line 67  sub handler {
             my ($redirect,$remote_ip);              my ($redirect,$remote_ip);
             if ($hdrhost eq $alias) {              if ($hdrhost eq $alias) {
                 $remote_ip = &Apache::lonnet::get_requestor_ip($r,REMOTE_NOLOOKUP);                  $remote_ip = &Apache::lonnet::get_requestor_ip($r,REMOTE_NOLOOKUP);
                 if ($vpnext && &Apache::lonnet::ip_match($remote_ip,$vpnext)) {                  if (($vpnext && &Apache::lonnet::ip_match($remote_ip,$vpnext)) &&
                       ($r->uri !~ m{^/adm/(lti|launch)/})) {
                     $redirect = $hostname;                      $redirect = $hostname;
                     if ($redirect eq $hdrhost) {                      if ($redirect eq $hdrhost) {
                         undef($redirect);                          undef($redirect);
Line 77  sub handler { Line 78  sub handler {
                 $remote_ip = &Apache::lonnet::get_requestor_ip($r,REMOTE_NOLOOKUP,1);                  $remote_ip = &Apache::lonnet::get_requestor_ip($r,REMOTE_NOLOOKUP,1);
                 unless (($remote_ip eq '127.0.0.1') || ($remote_ip eq '::1') ||                  unless (($remote_ip eq '127.0.0.1') || ($remote_ip eq '::1') ||
                         ($remote_ip eq &Apache::lonnet::get_host_ip($lonhost)) ||                          ($remote_ip eq &Apache::lonnet::get_host_ip($lonhost)) ||
                           ($r->uri=~m{^/adm/(lti|launch)/}) ||
                         ($vpnint && &Apache::lonnet::ip_match($remote_ip,$vpnint))) {                          ($vpnint && &Apache::lonnet::ip_match($remote_ip,$vpnint))) {
                     $redirect = $alias;                      $redirect = $alias;
                     if ($r->uri=~m{^/raw/}){                      if (($r->uri=~m{^/raw/}) || ($r->uri=~m{^/adm/dns/})) {
                         my %iphost = &Apache::lonnet::get_iphost();                          my %iphost = &Apache::lonnet::get_iphost();
                         if (exists($iphost{$remote_ip})) {                          if (exists($iphost{$remote_ip})) {
                             undef($redirect);                              undef($redirect);
Line 89  sub handler { Line 91  sub handler {
             }              }
             if ($redirect) {              if ($redirect) {
                 my $uri = $r->uri;                  my $uri = $r->uri;
                   if (($uri eq '/adm/sso') || ($uri eq '/adm/switchserver') ||
                       ($uri =~ m{^/Shibboleth.sso/})) {
                       return DECLINED;
                   }
                 unless ($uri eq '/adm/migrateuser') {                  unless ($uri eq '/adm/migrateuser') {
                     my %user;                      my %user;
                     my $handle = &Apache::lonnet::check_for_valid_session($r,undef,\%user);                      my $handle = &Apache::lonnet::check_for_valid_session($r,undef,\%user);
Line 107  sub handler { Line 113  sub handler {
                     $protocol = 'https';                      $protocol = 'https';
                 }                  }
                 my $querystring = $r->args;                  my $querystring = $r->args;
                   if ($uri =~ m{^(/adm/css/)(.+)(.css)$}) {
                       $uri = $1.&escape($2).$3;
                   }
                 my $location = $protocol.'://'.$redirect.$uri;                  my $location = $protocol.'://'.$redirect.$uri;
                 if ($querystring) {                  if ($querystring) {
                     $location .= "?$querystring";                      $location .= "?$querystring";

Removed from v.1.30  
changed lines
  Added in v.1.34


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>