function Request::isFromTrustedProxy
Indicates whether this request originated from a trusted proxy.
This can be useful to determine whether or not to trust the contents of a proxy-specific header.
6 calls to Request::isFromTrustedProxy()
- Request::getBaseUrl in vendor/
symfony/ http-foundation/ Request.php - Returns the root URL from which this request is executed.
- Request::getClientIps in vendor/
symfony/ http-foundation/ Request.php - Returns the client IP addresses.
- Request::getHost in vendor/
symfony/ http-foundation/ Request.php - Returns the host name.
- Request::getPort in vendor/
symfony/ http-foundation/ Request.php - Returns the port on which the request is made.
- Request::getProtocolVersion in vendor/
symfony/ http-foundation/ Request.php - Returns the protocol version.
File
-
vendor/
symfony/ http-foundation/ Request.php, line 1986
Class
- Request
- Request represents an HTTP request.
Namespace
Symfony\Component\HttpFoundationCode
public function isFromTrustedProxy() : bool {
return self::$trustedProxies && IpUtils::checkIp($this->server
->get('REMOTE_ADDR', ''), self::$trustedProxies);
}