--- loncom/auth/lonlogin.pm 2020/10/16 23:27:45 1.180
+++ loncom/auth/lonlogin.pm 2021/05/03 15:27:44 1.183
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Login Screen
#
-# $Id: lonlogin.pm,v 1.180 2020/10/16 23:27:45 raeburn Exp $
+# $Id: lonlogin.pm,v 1.183 2021/05/03 15:27:44 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -143,6 +143,10 @@ sub handler {
if ($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 $start_page =
&Apache::loncommon::start_page('Switching Server ...',undef,
@@ -469,6 +473,7 @@ sub handler {
next if ($hostid eq $lonhost);
my $hostname = &Apache::lonnet::hostname($hostid);
next if (($hostname eq '') || ($spareservers{$hostname}));
+ $spareservers{$hostname} = 1;
my $protocol = $Apache::lonnet::protocol{$hostid};
$protocol = 'http' if ($protocol ne 'https');
$spares.='