- Fixed port redirection for URL behind proxy
This commit is contained in:
1 parent
2fe97c60ed
commit
f9c955a82a
2 files changed
+15
-13
No files matched your search
@@ -195,7 +195,12 @@ PATTERN;
|
||||
|
||||
protected function domain() : string
|
||||
{
|
||||
$port = $this->isDefaultPort() ? "" : ":" . $_SERVER['SERVER_PORT'];
|
||||
if ( ! empty($_SERVER['HTTP_X_FORWARDED_PROTO']) || ! empty($_SERVER['HTTP_X_FORWARDED_SSL']) ) {
|
||||
$port = "";
|
||||
}
|
||||
else {
|
||||
$port = $this->isDefaultPort() ? "" : ":" . $_SERVER['SERVER_PORT'];
|
||||
}
|
||||
|
||||
return strtolower($this->appUrl ? $this->appUrl . $port : $_SERVER['HTTP_HOST']);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user