Skip to content

Commit f89abf0

Browse files
authored
Update Store.php
1 parent 49cc612 commit f89abf0

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

app/code/Magento/Store/Model/Store.php

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -801,16 +801,24 @@ public function isUrlSecure()
801801
/**
802802
* Check if request was secure
803803
*
804-
* @return boolean
804+
* @return bool
805805
*/
806806
public function isCurrentlySecure()
807807
{
808808
if ($this->_request->isSecure()) {
809809
return true;
810810
}
811811

812-
$secureBaseUrl = $this->_config->getValue(self::XML_PATH_SECURE_BASE_URL, ScopeInterface::SCOPE_STORE);
813-
$secureFrontend = $this->_config->getValue(self::XML_PATH_SECURE_IN_FRONTEND, ScopeInterface::SCOPE_STORE);
812+
$secureBaseUrl = $this->_config->getValue(
813+
self::XML_PATH_SECURE_BASE_URL,
814+
ScopeInterface::SCOPE_STORE,
815+
$this->getId()
816+
);
817+
$secureFrontend = $this->_config->getValue(
818+
self::XML_PATH_SECURE_IN_FRONTEND,
819+
ScopeInterface::SCOPE_STORE,
820+
$this->getId()
821+
);
814822

815823
if (!$secureBaseUrl || !$secureFrontend) {
816824
return false;
@@ -819,8 +827,8 @@ public function isCurrentlySecure()
819827
$uri = UriFactory::factory($secureBaseUrl);
820828
$port = $uri->getPort();
821829
$serverPort = $this->_request->getServer('SERVER_PORT');
822-
$isSecure = $uri->getScheme() == 'https' && isset($serverPort) && $port == $serverPort;
823-
return $isSecure;
830+
831+
return $uri->getScheme() == 'https' && isset($serverPort) && $port == $serverPort;
824832
}
825833

826834
/*************************************************************************************

0 commit comments

Comments
 (0)