- Integrated fix for patch #188 - ForceHttps = SecureConnectionRequired

SVN:trunk[670]
This commit is contained in:
Denis Flaven
2010-08-10 16:53:28 +00:00
parent 5b0c1e3003
commit 73458617bf
2 changed files with 6 additions and 2 deletions

View File

@@ -194,8 +194,7 @@ EOF
static function SecureConnectionRequired()
{
$oConfig = new Config(ITOP_CONFIG_FILE);
return $oConfig->GetSecureConnectionRequired();
return utils::GetConfig()->GetSecureConnectionRequired();
}
static function IsConnectionSecure()

View File

@@ -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';