--- loncom/auth/lonshibauth.pm 2015/05/17 17:34:43 1.3 +++ loncom/auth/lonshibauth.pm 2021/05/04 18:47:37 1.4 @@ -1,7 +1,7 @@ # The LearningOnline Network # Redirect Shibboleth authentication to designated URL (/adm/sso). # -# $Id: lonshibauth.pm,v 1.3 2015/05/17 17:34:43 raeburn Exp $ +# $Id: lonshibauth.pm,v 1.4 2021/05/04 18:47:37 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -80,6 +80,8 @@ sub handler { if (!$hostname) { $hostname = $r->hostname(); } my $protocol = $Apache::lonnet::protocol{$lonhost}; unless ($protocol eq 'https') { $protocol = 'http'; } + my $alias = &Apache::lonnet::use_proxy_alias($r,$lonhost); + $hostname = $alias if ($alias ne ''); my $dest = $protocol.'://'.$hostname.$target; $r->subprocess_env; if ($ENV{'QUERY_STRING'} ne '') {