Skip to content

Commit

Permalink
Compare admin domain from the start, not as a substring
Browse files Browse the repository at this point in the history
  • Loading branch information
zapotocnylubos authored Jun 4, 2024
1 parent 4745100 commit d69b65c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/code/Magento/Backend/App/Area/FrontNameResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public function isHostBackend()
$host = (string) $this->request->getServer('HTTP_HOST', '');
$hostWithPort = $this->getHostWithPort($backendUrl);

return !($hostWithPort === null || $host === '') && stripos($hostWithPort, $host) !== false;
return !($hostWithPort === null || $host === '') && stripos($hostWithPort, $host) === 0;
}

/**
Expand Down

0 comments on commit d69b65c

Please sign in to comment.