Skip to content

Commit

Permalink
refactor: remove unused private method
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Feb 23, 2023
1 parent 9c7cc3c commit 4cc8d97
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions system/HTTP/IncomingRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -468,30 +468,6 @@ public function setPath(string $path, ?App $config = null)
return $this;
}

/**
* @deprecated Moved to SiteURIFactory.
*/
private function determineHost(App $config, string $baseURL): string
{
$host = parse_url($baseURL, PHP_URL_HOST);

if (empty($config->allowedHostnames)) {
return $host;
}

// Update host if it is valid.
$httpHostPort = $this->getServer('HTTP_HOST');
if ($httpHostPort !== null) {
[$httpHost] = explode(':', $httpHostPort, 2);

if (in_array($httpHost, $config->allowedHostnames, true)) {
$host = $httpHost;
}
}

return $host;
}

/**
* Returns the URI path relative to baseURL,
* running detection as necessary.
Expand Down

0 comments on commit 4cc8d97

Please sign in to comment.