From 268be895e9cf8a0df491079badf83a8126d747ef Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Sun, 28 Feb 2021 03:33:33 +0800 Subject: [PATCH] when https 443 port no need --- include/globalfunctions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/globalfunctions.php b/include/globalfunctions.php index ced860cd..ae03fe9a 100644 --- a/include/globalfunctions.php +++ b/include/globalfunctions.php @@ -400,7 +400,7 @@ function getSchemeAndHttpHost() $protocol = $isHttps ? 'https' : 'http'; $port = $_SERVER['SERVER_PORT']; $result = "$protocol://" . $_SERVER['HTTP_HOST']; - if ($port != 80) { + if ((!$isHttps && $port != 80) || ($isHttps && $port != 443)) { $result .= ":$port"; } return $result;