diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index adf6bd6c5..a7c93f745 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -783,6 +783,7 @@ **/ function getRequestUri($ssl_mode = FOLLOW_REQUEST_SSL, $domain = null) { static $url = array(); + if($GLOBALS['_use_ssl'] == "always") $ssl_mode = ENFORCE_SSL; if($domain) $domain_key = md5($domain); else $domain_key = 'default'; diff --git a/common/js/common.js b/common/js/common.js index 5096f8278..7b9d5124f 100644 --- a/common/js/common.js +++ b/common/js/common.js @@ -328,26 +328,36 @@ String.prototype.setQuery = function(key, val) { } uri = uri.replace(re,toReplace); } - - if(typeof(ssl_actions)!='undefined' && typeof(ssl_actions.length)!='undefined' && uri.getQuery('act')) { + var bUseSSL = false; + if(typeof(enforce_ssl)!='undefined' && enforce_ssl) + { + bUseSSL = true; + } + else if(typeof(ssl_actions)!='undefined' && typeof(ssl_actions.length)!='undefined' && uri.getQuery('act')) { var act = uri.getQuery('act'); for(i=0;i diff --git a/common/tpl/common_layout.html b/common/tpl/common_layout.html index 15d4c315f..175253581 100644 --- a/common/tpl/common_layout.html +++ b/common/tpl/common_layout.html @@ -53,6 +53,7 @@ var ssl_actions = new Array("{implode('","',$ssl_actions)}"); var http_port = {$GLOBALS["_http_port"]}; var https_port = {$GLOBALS["_https_port"]}; + var enforce_ssl = true; //]]> {Context::getHtmlHeader()}