diff --git a/library/think/Request.php b/library/think/Request.php index 2b0fda30..9cd4ccf1 100644 --- a/library/think/Request.php +++ b/library/think/Request.php @@ -269,9 +269,9 @@ class Request return $this; } elseif (!$this->domain) { $this->domain = $this->scheme() . '://' . $this->host(); - } - if (80 != $this->port()) { - $this->domain .= ':' . $this->port(); + if (!in_array($this->port(), ['80', '443'])) { + $this->domain .= ':' . $this->port(); + } } return $this->domain; }