diff --git a/pub/errors/processor.php b/pub/errors/processor.php index ee947320e0569..231c13dcfe0c4 100644 --- a/pub/errors/processor.php +++ b/pub/errors/processor.php @@ -256,7 +256,7 @@ public function getHostUrl() $isSecure = (!empty($_SERVER['HTTPS'])) && ($_SERVER['HTTPS'] != 'off'); $url = ($isSecure ? 'https://' : 'http://') . $host; - if (!empty($_SERVER['SERVER_PORT']) && !in_array($_SERVER['SERVER_PORT'], [80, 433]) + if (!empty($_SERVER['SERVER_PORT']) && !in_array($_SERVER['SERVER_PORT'], [80, 443]) && !preg_match('/.*?\:[0-9]+$/', $url) ) { $url .= ':' . $_SERVER['SERVER_PORT'];