Commit 1c382ff2 authored by Clément OUDOT's avatar Clément OUDOT

Resolve alias when building redirect URL (#1514)

parent 65296a4b
......@@ -518,8 +518,9 @@ sub retrieveSession {
# @return URL
sub _buildUrl {
my ( $class, $req, $s ) = @_;
my $vhost = $req->{env}->{HTTP_HOST};
my $_https = (
my $realvhost = $req->{env}->{HTTP_HOST};
my $vhost = $class->resolveAlias($req);
my $_https = (
defined( $class->tsv->{https}->{$vhost} )
? $class->tsv->{https}->{$vhost}
: $class->tsv->{https}->{_}
......@@ -533,7 +534,7 @@ sub _buildUrl {
or ( $_https && $portString == 443 )
or ( !$_https && $portString == 80 )
) ? '' : ":$portString";
my $url = "http" . ( $_https ? "s" : "" ) . "://$vhost$portString$s";
my $url = "http" . ( $_https ? "s" : "" ) . "://$realvhost$portString$s";
$class->logger->debug("Build URL $url");
return $url;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment