Commit ca399ab5 authored by Xavier Guimard's avatar Xavier Guimard

Menu didn't use resolveAlias() (#1317)

parent 5d1fa4ef
......@@ -129,7 +129,7 @@
.\" ========================================================================
.\"
.IX Title "llng-fastcgi-server 1"
.TH llng-fastcgi-server 1 "2017-09-26" "perl v5.26.0" "User Contributed Perl Documentation"
.TH llng-fastcgi-server 1 "2017-10-20" "perl v5.26.0" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
......@@ -569,7 +569,7 @@ sub cleanHeaders {
# returns vhost whose current hostname is an alias
sub resolveAlias {
my ( $class, $req ) = @_;
my $vhost = $req->{env}->{HTTP_HOST};
my $vhost = ref $req ? $req->{env}->{HTTP_HOST} : $req;
$vhost =~ s/:\d+//;
return $class->tsv->{vhostAlias}->{$vhost}
......
......@@ -409,6 +409,7 @@ sub _filterHash {
my ( $vhost, $appuri ) =
$apphash->{$key}->{options}->{uri} =~ m#^https?://([^/]*)(.*)#;
$vhost =~ s/:\d+$//;
$vhost = $self->p->HANDLER->resolveAlias($vhost);
$appuri ||= '/';
# Remove if display is "no" or "off"
......
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