return $trustedPrefix.
$this->
getBaseUrlReal();
} /**
* Returns the real base URL received by the webserver from which this request is executed.
* The URL does not include trusted reverse proxy prefix.
*
* @return string The raw URL (i.e. not urldecoded)
*/
private function getBaseUrlReal(): string
{ return $this->baseUrl ??=
$this->
prepareBaseUrl();
} /**
* Gets the request's scheme.
*/
public function getScheme(): string
{ return $this->
isSecure() ? 'https' : 'http';
} /**
* Returns the port on which the request is made.
*
* This method can read the client port from the "X-Forwarded-Port" header
* when trusted proxies were set via "setTrustedProxies()".
*
* The "X-Forwarded-Port" header must contain the client port.
*
* @return int|string|null Can be a string if fetched from the server bag
*/