Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
geek-at committed Nov 13, 2023
2 parents 67fba8e + 7f18a19 commit fc9a7d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docker/rootfs/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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});"
}

Expand Down
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 fc9a7d3

Please sign in to comment.