$vhost may contain port number (#1044)

environments/ppa-mbqj77/deployments/1
Xavier Guimard 8 years ago
parent ef8bd5cccf
commit ac611fafd0
  1. 3
      lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Run.pm

@ -502,7 +502,8 @@ sub _buildUrl {
|| $class->tsv->{port}->{_}
|| $req->{env}->{SERVER_PORT};
$portString = (
( $_https && $portString == 443 )
( $vhost =~ /:\d+/ )
or ( $_https && $portString == 443 )
or ( !$_https && $portString == 80 )
) ? '' : ":$portString";
my $url = "http" . ( $_https ? "s" : "" ) . "://$vhost$portString$s";

Loading…
Cancel
Save