diff --git a/src/Pecee/Http/Request.php b/src/Pecee/Http/Request.php index e9f9742..642cd1b 100644 --- a/src/Pecee/Http/Request.php +++ b/src/Pecee/Http/Request.php @@ -395,6 +395,10 @@ class Request { $this->url = $url; + if ($this->getHost() !== null) { + $url->setHost($this->getHost()); + } + if ($this->isSecure() === true) { $this->url->setScheme('https'); } diff --git a/src/Pecee/Http/Url.php b/src/Pecee/Http/Url.php index 7b15ae4..a76f733 100644 --- a/src/Pecee/Http/Url.php +++ b/src/Pecee/Http/Url.php @@ -541,7 +541,7 @@ class Url implements JsonSerializable public function __toString(): string { - return $this->getHost(true) . $this->getRelativeUrl(); + return $this->getRelativeUrl(); } } \ No newline at end of file