This commit is contained in:
Chris
2023-11-13 10:27:47 +01:00
2 changed files with 3 additions and 2 deletions

View File

@@ -57,7 +57,7 @@ _buildConfig() {
echo "define('ENCRYPTION_KEY', '${ENCRYPTION_KEY:-}');"
echo "define('FFMPEG_BINARY', '${FFMPEG_BINARY:-/usr/bin/ffmpeg}');"
echo "define('ALWAYS_WEBP', ${ALWAYS_WEBP:-false});"
echo "define('ALLOWED_DOMAINS', ${ALLOWED_DOMAINS:-});"
echo "define('ALLOWED_DOMAINS', '${ALLOWED_DOMAINS:-}');"
echo "define('SPLIT_DATA_DIR', ${SPLIT_DATA_DIR:-false});"
}

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).'/';
}
}