mirror of
https://github.com/HaschekSolutions/pictshare.git
synced 2025-11-20 15:08:00 +00:00
Merge branch 'master' of https://github.com/HaschekSolutions/pictshare
This commit is contained in:
@@ -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});"
|
||||
}
|
||||
|
||||
|
||||
@@ -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).'/';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user