mirror of
https://github.com/bitinflow/expose.git
synced 2026-11-01 05:09:11 +00:00
Rewrite location header
This commit is contained in:
1 parent
538c7da446
commit
880259657f
5 files changed
+56
-6
No files matched your search
@@ -36,4 +36,16 @@ class Configuration
|
||||
{
|
||||
return intval($this->port);
|
||||
}
|
||||
|
||||
public function getUrl(string $subdomain): string
|
||||
{
|
||||
$httpProtocol = $this->port() === 443 ? 'https' : 'http';
|
||||
$host = $this->host();
|
||||
|
||||
if ($httpProtocol !== 'https') {
|
||||
$host .= ":{$this->port()}";
|
||||
}
|
||||
|
||||
return "{$subdomain}.{$host}";
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user