mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-21 17:48:43 +02:00
- Integrated fix for patch #188 - ForceHttps = SecureConnectionRequired
SVN:trunk[670]
This commit is contained in:
@@ -194,8 +194,7 @@ EOF
|
||||
|
||||
static function SecureConnectionRequired()
|
||||
{
|
||||
$oConfig = new Config(ITOP_CONFIG_FILE);
|
||||
return $oConfig->GetSecureConnectionRequired();
|
||||
return utils::GetConfig()->GetSecureConnectionRequired();
|
||||
}
|
||||
|
||||
static function IsConnectionSecure()
|
||||
|
||||
@@ -185,6 +185,11 @@ class utils
|
||||
{
|
||||
// Build an absolute URL to this page on this server/port
|
||||
$sServerName = $_SERVER['SERVER_NAME'];
|
||||
if (self::GetConfig()->GetSecureConnectionRequired())
|
||||
{
|
||||
// If a secure connection is required, then any URL must start with https !
|
||||
$bForceHTTPS = true;
|
||||
}
|
||||
if ($bForceHTTPS)
|
||||
{
|
||||
$sProtocol = 'https';
|
||||
|
||||
Reference in New Issue
Block a user