Skip to content

Commit 3f4a9fd

Browse files
committed
fix: remove $allowedHostnames check
SiteURI will check.
1 parent fe754f3 commit 3f4a9fd

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

‎system/HTTP/SiteURI.php‎

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ class SiteURI extends URI
8383
/**
8484
* @param string $relativePath URI path relative to baseURL. May include
8585
* queries or fragments.
86-
* @param string|null $host Optional hostname. If it is not in
87-
* $allowedHostnames, just be ignored.
86+
* @param string|null $host Optional current hostname.
8887
* @param string|null $scheme Optional scheme. 'http' or 'https'.
8988
* @phpstan-param 'http'|'https'|null $scheme
9089
*/
@@ -153,7 +152,7 @@ private function determineBaseURL(
153152
}
154153

155154
// Update host
156-
if ($host !== null && $this->checkHost($host, $configApp->allowedHostnames)) {
155+
if ($host !== null) {
157156
$uri->setHost($host);
158157
}
159158

@@ -187,11 +186,6 @@ private function getIndexPageRoutePath(string $routePath): string
187186
return $indexPageRoutePath;
188187
}
189188

190-
private function checkHost(string $host, array $allowedHostnames): bool
191-
{
192-
return in_array($host, $allowedHostnames, true);
193-
}
194-
195189
private function normalizeBaseURL(App $configApp): string
196190
{
197191
// It's possible the user forgot a trailing slash on their

0 commit comments

Comments
 (0)