Fixed protocol getter
This commit is contained in:
parent
8d010753c8
commit
cc3aa27d57
|
@ -141,11 +141,13 @@ class Request extends UtopiaRequest
|
|||
*/
|
||||
public function getProtocol(): string
|
||||
{
|
||||
if($this->getServer('server_protocol', '') === 'HTTP/1.1') {
|
||||
$protocol = $this->getHeader('x-forwarded-proto', $this->getServer('server_protocol', 'https'));
|
||||
|
||||
if($protocol === 'HTTP/1.1') {
|
||||
return 'http';
|
||||
}
|
||||
|
||||
return $this->getHeader('x-forwarded-proto', 'https');
|
||||
return $protocol;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue