Fixed get port method

This commit is contained in:
Eldad Fux
2020-07-02 20:58:24 +03:00
parent 521f206f09
commit e24a6cd52d
+1 -1
View File
@@ -162,7 +162,7 @@ class Request extends UtopiaRequest
*/
public function getPort(): string
{
return $this->getHeader('x-forwarded-port', \parse_url($this->getProtocol().'//'.$this->getHeader('x-forwarded-host', $this->getHeader('host')), PHP_URL_PORT));
return $this->getHeader('x-forwarded-port', (string)\parse_url($this->getProtocol().'://'.$this->getHeader('x-forwarded-host', $this->getHeader('host')), PHP_URL_PORT));
}
/**