Skip to content

Commit 5af4ff7

Browse files
committed
ACP2E-3373: [Cloud] Admin Panel exposed to the public - Custom Admin URL not effective
1 parent b37801b commit 5af4ff7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,11 @@ public function isHostBackend()
141141
return false;
142142
}
143143

144-
$configuredPort = $this->uri->getPort() ?: ($this->standardPorts[$this->uri->getScheme()] ?? '');
144+
$configuredPort = $this->uri->getPort() ?: ($this->standardPorts[$this->uri->getScheme()] ?? '80');
145145
$configuredHost = $this->uri->getHost() . ':' . $configuredPort;
146146
$host = $this->request->getServer('HTTP_HOST');
147147
if (!str_contains($host, ':')) {
148-
$host .= ':' . ($this->standardPorts[$this->request->getServer('REQUEST_SCHEME')] ?? '');
148+
$host .= ':' . ($this->standardPorts[$this->request->getServer('REQUEST_SCHEME')] ?? '80');
149149
}
150150

151151
return strcasecmp($configuredHost, $host) === 0;

0 commit comments

Comments
 (0)