Skip to content

Commit

Permalink
Update core.php
Browse files Browse the repository at this point in the history
added override for host if it doesn't contain a port
  • Loading branch information
geek-at committed Nov 4, 2023
1 parent 090f452 commit 7f18a19
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inc/core.php
Original file line number Diff line number Diff line change
Expand Up @@ -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!='')
Expand All @@ -1001,4 +1002,4 @@ function getURL()
return URL;
$protocol = strpos(strtolower($_SERVER['SERVER_PROTOCOL']), 'https') === FALSE ? 'http' : 'https';
return $protocol . '://' . getDomain(false).'/';
}
}

0 comments on commit 7f18a19

Please sign in to comment.