Update core.php

added override for host if it doesn't contain a port
This commit is contained in:
Christian Haschek
2023-11-04 18:14:55 +01:00
committed by GitHub
parent 090f452585
commit 7f18a193d4

View File

@@ -983,6 +983,7 @@ function getDomain($stripport=true)
//strip port
if(strpos($host,':')!==false)
$strippedhost = substr($host,0,strpos($host,':'));
else $strippedhost = $host;
//check if it's in ALLOWED_DOMAINS
if(defined('ALLOWED_DOMAINS') && ALLOWED_DOMAINS!='')
@@ -1001,4 +1002,4 @@ function getURL()
return URL;
$protocol = strpos(strtolower($_SERVER['SERVER_PROTOCOL']), 'https') === FALSE ? 'http' : 'https';
return $protocol . '://' . getDomain(false).'/';
}
}