Skip to content

Commit 50535cf

Browse files
committed
MC-24840: Infinite redirect in case of backend URL is different from default website URL
1 parent e00d2fc commit 50535cf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/code/Magento/Backend/App/Area/FrontNameResolver.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ public function getFrontName($checkHost = false)
120120
*/
121121
public function isHostBackend()
122122
{
123-
if ($this->scopeConfig->getValue(self::XML_PATH_USE_CUSTOM_ADMIN_URL, ScopeInterface::SCOPE_STORE)) {
124-
$backendUrl = $this->scopeConfig->getValue(self::XML_PATH_CUSTOM_ADMIN_URL, ScopeInterface::SCOPE_STORE);
123+
if ($this->config->getValue(self::XML_PATH_USE_CUSTOM_ADMIN_URL)) {
124+
$backendUrl = $this->config->getValue(self::XML_PATH_CUSTOM_ADMIN_URL);
125125
} else {
126-
$backendUrl = $this->scopeConfig->getValue(Store::XML_PATH_UNSECURE_BASE_URL, ScopeInterface::SCOPE_STORE);
126+
$backendUrl = $this->config->getValue(Store::XML_PATH_UNSECURE_BASE_URL);
127127
}
128128
$host = $this->request->getServer('HTTP_HOST', '');
129129
return stripos($this->getHostWithPort($backendUrl), (string) $host) !== false;

0 commit comments

Comments
 (0)