Merge branch 'support/2.7' into develop

This commit is contained in:
odain
2021-03-15 16:06:20 +01:00
6 changed files with 68 additions and 9 deletions

View File

@@ -861,7 +861,7 @@ class utils
}
/**
* @return bool The boolean value of the conf. "trust_proxies" (except if there is no REMOTE_ADDR int his case, it return false)
* @return bool The boolean value of the conf. "behind_reverse_proxy" (except if there is no REMOTE_ADDR int his case, it return false)
*
* @since 2.7.4
*/
@@ -871,7 +871,7 @@ class utils
return false;
}
$bTrustProxies = (bool) self::GetConfig()->Get('trust_proxies');
$bTrustProxies = (bool) self::GetConfig()->Get('behind_reverse_proxy');
return $bTrustProxies;
}
@@ -890,7 +890,7 @@ class utils
public static function GetAbsoluteUrlAppRoot($bForceTrustProxy = false)
{
static $sUrl = null;
if ($sUrl === null)
if ($sUrl === null || $bForceTrustProxy)
{
$sUrl = self::GetConfig()->Get('app_root_url');
if ($sUrl == '')