mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 16:57:53 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 301d551981 | |||
| 90418eb41c |
@@ -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');
|
||||
}
|
||||
|
||||
@@ -75,8 +75,8 @@ class Url implements JsonSerializable
|
||||
if ($url !== null) {
|
||||
$data = $this->parseUrl($url);
|
||||
|
||||
$this->scheme = $data['scheme'] ?? null;
|
||||
$this->host = $data['host'] ?? null;
|
||||
$this->scheme = $data['scheme'] ?? $this->scheme;
|
||||
$this->host = $data['host'] ?? $this->host;
|
||||
$this->port = $data['port'] ?? null;
|
||||
$this->username = $data['user'] ?? null;
|
||||
$this->password = $data['pass'] ?? null;
|
||||
@@ -541,7 +541,7 @@ class Url implements JsonSerializable
|
||||
|
||||
public function __toString(): string
|
||||
{
|
||||
return $this->getHost(true) . $this->getRelativeUrl();
|
||||
return $this->getRelativeUrl();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user