- Fixed host not set on request url.
- Url returns relativeUrl when calling toString() to avoid any issues when using in RouteUrl(url()) for rewrites.
This commit is contained in:
Simon
2024-11-06 11:05:43 +01:00
parent 0634ba79dc
commit 90418eb41c
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -395,6 +395,10 @@ class Request
{ {
$this->url = $url; $this->url = $url;
if ($this->getHost() !== null) {
$url->setHost($this->getHost());
}
if ($this->isSecure() === true) { if ($this->isSecure() === true) {
$this->url->setScheme('https'); $this->url->setScheme('https');
} }
+1 -1
View File
@@ -541,7 +541,7 @@ class Url implements JsonSerializable
public function __toString(): string public function __toString(): string
{ {
return $this->getHost(true) . $this->getRelativeUrl(); return $this->getRelativeUrl();
} }
} }