Merge branch 'ticket-12487-HTTPS' into develop
This commit is contained in:
commit
b38e5c87ab
@ -3,7 +3,7 @@ class FrontController extends FrontControllerCore {
|
||||
public function __construct() {
|
||||
global $useSSL;
|
||||
|
||||
if($_SERVER['SERVER_PORT'] == _PS_SSL_PORT_ || !empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' || Configuration::get('PS_SSL_ENABLED')) {
|
||||
if($_SERVER['SERVER_PORT'] == _PS_SSL_PORT_ || !empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PORT'] == '443') || Configuration::get('PS_SSL_ENABLED')) {
|
||||
$useSSL = $this->ssl = TRUE;
|
||||
} else {
|
||||
$useSSL = $this->ssl;
|
||||
@ -319,7 +319,7 @@ class FrontController extends FrontControllerCore {
|
||||
if(isset($this->php_self) && !empty($this->php_self)) {
|
||||
// $_SERVER['HTTP_HOST'] must be replaced by the real canonical domain
|
||||
$canonicalURL = $link->getPageLink($this->php_self, $this->ssl, $cookie->id_lang);
|
||||
if(!Tools::getValue('ajax') && !preg_match('/^'.Tools::pRegexp($canonicalURL, '/').'([&?].*)?$/', (($_SERVER['SERVER_PORT'] == _PS_SSL_PORT_ || !empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' || Configuration::get('PS_SSL_ENABLED'))? 'https://': 'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'])) {
|
||||
if(!Tools::getValue('ajax') && !preg_match('/^'.Tools::pRegexp($canonicalURL, '/').'([&?].*)?$/', (($_SERVER['SERVER_PORT'] == _PS_SSL_PORT_ || !empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PORT'] == '443') || Configuration::get('PS_SSL_ENABLED'))? 'https://': 'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'])) {
|
||||
header('HTTP/1.0 301 Moved');
|
||||
$params = '';
|
||||
$excludedKey = array('isolang', 'id_lang');
|
||||
|
@ -29,7 +29,7 @@ class Link extends LinkCore
|
||||
return $base._MODULE_DIR_.'/'.Module::getModuleNameFromClass('AdminGuidePosts').'/';
|
||||
}
|
||||
|
||||
public function getPageLinkSsl($filename, $ssl = false, $id_lang = NULL)
|
||||
public function getPageLink($filename, $ssl = false, $id_lang = NULL)
|
||||
{
|
||||
global $cookie;
|
||||
if ($id_lang == NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user