version 1.180, 2020/10/16 23:27:45
|
version 1.183, 2021/05/03 15:27:44
|
Line 143 sub handler {
|
Line 143 sub handler {
|
if ($balancer_token) {
|
if ($balancer_token) {
|
$dest .= (($dest=~/\?/)?'&;':'?') . 'btoken='.$balancer_token;
|
$dest .= (($dest=~/\?/)?'&;':'?') . 'btoken='.$balancer_token;
|
}
|
}
|
|
unless ($found_server eq $lonhost) {
|
|
my $alias = &Apache::lonnet::use_proxy_alias($r,$found_server);
|
|
$hostname = $alias if ($alias ne '');
|
|
}
|
my $url = $protocol.'://'.$hostname.$dest;
|
my $url = $protocol.'://'.$hostname.$dest;
|
my $start_page =
|
my $start_page =
|
&Apache::loncommon::start_page('Switching Server ...',undef,
|
&Apache::loncommon::start_page('Switching Server ...',undef,
|
Line 469 sub handler {
|
Line 473 sub handler {
|
next if ($hostid eq $lonhost);
|
next if ($hostid eq $lonhost);
|
my $hostname = &Apache::lonnet::hostname($hostid);
|
my $hostname = &Apache::lonnet::hostname($hostid);
|
next if (($hostname eq '') || ($spareservers{$hostname}));
|
next if (($hostname eq '') || ($spareservers{$hostname}));
|
|
$spareservers{$hostname} = 1;
|
my $protocol = $Apache::lonnet::protocol{$hostid};
|
my $protocol = $Apache::lonnet::protocol{$hostid};
|
$protocol = 'http' if ($protocol ne 'https');
|
$protocol = 'http' if ($protocol ne 'https');
|
$spares.='<br /><a href="'.$protocol.'://'.
|
$spares.='<br /><a href="'.$protocol.'://'.
|
Line 604 ENDSCRIPT
|
Line 609 ENDSCRIPT
|
my $omitextra;
|
my $omitextra;
|
if ($headextra_exempt ne '') {
|
if ($headextra_exempt ne '') {
|
my @exempt = split(',',$headextra_exempt);
|
my @exempt = split(',',$headextra_exempt);
|
my $ip = $ENV{'REMOTE_ADDR'};
|
my $ip = &Apache::lonnet::get_requestor_ip();
|
if (grep(/^\Q$ip\E$/,@exempt)) {
|
if (grep(/^\Q$ip\E$/,@exempt)) {
|
$omitextra = 1;
|
$omitextra = 1;
|
}
|
}
|
Line 847 sub check_loginvia {
|
Line 852 sub check_loginvia {
|
my $output;
|
my $output;
|
if ($loginvia ne '') {
|
if ($loginvia ne '') {
|
my $noredirect;
|
my $noredirect;
|
my $ip = $ENV{'REMOTE_ADDR'};
|
my $ip = &Apache::lonnet::get_requestor_ip();
|
if ($ip eq '127.0.0.1') {
|
if ($ip eq '127.0.0.1') {
|
$noredirect = 1;
|
$noredirect = 1;
|
} else {
|
} else {
|