Symfony\Component\HttpFoundation\Request::isFromTrustedProxy PHP Method

isFromTrustedProxy() public method

This can be useful to determine whether or not to trust the contents of a proxy-specific header.
public isFromTrustedProxy ( ) : boolean
return boolean true if the request came from a trusted proxy, false otherwise
    public function isFromTrustedProxy()
    {
        return self::$trustedProxies && IpUtils::checkIp($this->server->get('REMOTE_ADDR'), self::$trustedProxies);
    }