优化当前域名获取

master
ELF 4 years ago
parent ef8334dd18
commit a0f57749c4

@ -99,7 +99,7 @@ class Request {
public function getHost()
{
$host = $this->getScheme() . '://' . $this->serverInfo['SERVER_NAME'];
$host = $this->getScheme() . '://' . $this->serverInfo['HTTP_HOST'];
if (in_array($this->serverInfo['SERVER_PORT'], [80, 443])) {
return $host;
}

Loading…
Cancel
Save