Skip to content

Commit 0d254a4

Browse files
committed
MAGETWO-52923: Switching to Varnish causes category menu to force HTTPS links
- Change Scope pool to use getHttpHost to make compatible with TestFramework/Request.php
1 parent bfa91c9 commit 0d254a4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/internal/Magento/Framework/App/Config/ScopePool.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,12 @@ public function getScope($scopeType, $scopeCode = null)
9393
$scopeCode = $this->_getScopeCode($scopeType, $scopeCode);
9494

9595
//Key by url to support dynamic {{base_url}} and port assignments
96-
$host = $this->getRequest()->getServer('HTTP_HOST');
96+
$host = $this->getRequest()->getHttpHost();
9797
$port = $this->getRequest()->getServer('SERVER_PORT');
9898
$path = $this->getRequest()->getBasePath();
99-
$host = ($host == null) ? 'localhost' : $host;
10099
$urlInfo = $host . $port . trim($path, '/');
101100
$code = $scopeType . '|' . $scopeCode . '|' . $urlInfo;
102-
101+
103102
if (!isset($this->_scopes[$code])) {
104103
$cacheKey = $this->_cacheId . '|' . $code;
105104
$data = $this->_cache->load($cacheKey);

0 commit comments

Comments
 (0)