protected function ipIsTrustedProxy($ipAddress)
    {
        if (filter_var($ipAddress, FILTER_VALIDATE_IP) === false) {
            return false;
        }
        $allowedProxies = $this->settings['proxies'];
        if ($allowedProxies === '*') {
            return true;
        }
        if (is_string($allowedProxies)) {
            $allowedProxies = array_map('trim', explode(',', $allowedProxies));
        }
        if (!is_array($allowedProxies)) {
            return false;
        }
        foreach ($allowedProxies as $ipPattern) {
            if (IpUtility::cidrMatch($ipAddress, $ipPattern)) {
                return true;
            }
        }
        return false;
    }
protected function ipIsTrustedProxy($ipAddress)
    {
        if (filter_var($ipAddress, FILTER_VALIDATE_IP) === false) {
            return false;
        }
        $allowedProxies = $this->settings['proxies'];
        if ($allowedProxies === '*') {
            return true;
        }
        if (is_string($allowedProxies)) {
            $allowedProxies = array_map('trim', explode(',', $allowedProxies));
        }
        if (!is_array($allowedProxies)) {
            return false;
        }
        foreach ($allowedProxies as $ipPattern) {
            if (IpUtility::cidrMatch($ipAddress, $ipPattern)) {
                return true;
            }
        }
        return false;
    }
protected function ipIsTrustedProxy ( $ ipAddress ) { if ( filter_var ( $ ipAddress , FILTER_VALIDATE_IP ) === false ) { return false ; } $ allowedProxies = $ this -> settings [ 'proxies' ] ; if ( $ allowedProxies === '*' ) { return true ; } if ( is_string ( $ allowedProxies ) ) { $ allowedProxies = array_map ( 'trim' , explode ( ',' , $ allowedProxies ) ) ; } if ( ! is_array ( $ allowedProxies ) ) { return false ; } foreach ( $ allowedProxies as $ ipPattern ) { if ( IpUtility :: cidrMatch ( $ ipAddress , $ ipPattern ) ) { return true ; } } return false ; }
Check if the given IP address is from a trusted proxy.

@param string $ipAddress
@return bool
Check if the given IP address is from a trusted proxy .