mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-13 13:35:54 +00:00
Rewrite location header
This commit is contained in:
@@ -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