Added [labs]forse_https settins

This commit is contained in:
RainLoop Team 2014-05-15 01:37:29 +04:00
parent 74b09e93df
commit 1a1be5c63a
3 changed files with 15 additions and 8 deletions

View file

@ -49,7 +49,7 @@ class Api
return false; return false;
} }
if (self::Config()->Get('labs', 'disable_iconv_if_mbstring_supported') && if (self::Config()->Get('labs', 'disable_iconv_if_mbstring_supported', false) &&
\class_exists('MailSo\Capa') && \MailSo\Base\Utils::IsMbStringSupported()) \class_exists('MailSo\Capa') && \MailSo\Base\Utils::IsMbStringSupported())
{ {
\MailSo\Capa::$ICONV = false; \MailSo\Capa::$ICONV = false;

View file

@ -242,6 +242,7 @@ Enables caching in the system'),
'curl_proxy' => array(''), 'curl_proxy' => array(''),
'curl_proxy_auth' => array(''), 'curl_proxy_auth' => array(''),
'in_iframe' => array(false), 'in_iframe' => array(false),
'forse_https' => array(false),
'custom_login_link' => array(''), 'custom_login_link' => array(''),
'custom_logout_link' => array(''), 'custom_logout_link' => array(''),
'allow_external_login' => array(false), 'allow_external_login' => array(false),

View file

@ -37,7 +37,7 @@ class Service
\ini_set('display_errors', 1); \ini_set('display_errors', 1);
} }
if ($this->oActions->Config()->Get('labs', 'disable_iconv_if_mbstring_supported') && if ($this->oActions->Config()->Get('labs', 'disable_iconv_if_mbstring_supported', false) &&
\class_exists('MailSo\Capa') && \MailSo\Base\Utils::IsMbStringSupported()) \class_exists('MailSo\Capa') && \MailSo\Base\Utils::IsMbStringSupported())
{ {
\MailSo\Capa::$ICONV = false; \MailSo\Capa::$ICONV = false;
@ -48,6 +48,12 @@ class Service
{ {
@\header('Server: '.$sServer, true); @\header('Server: '.$sServer, true);
} }
if ($this->oActions->Config()->Get('labs', 'forse_https', false) && !$this->oHttp->IsSecure())
{
@\header('Location: https://'.$this->oHttp->GetHost(false, false).$this->oHttp->GetUrl(), true);
exit();
}
} }
/** /**