func (m MatchRemoteIP) Match(r *http.Request) bool {
	clientIP, zoneID, err := m.getClientIP(r)
	if err != nil {
		m.logger.Error("getting client IP", zap.Error(err))
		return false
	}
	zoneFilter := true
	for i, ipRange := range m.cidrs {
		if ipRange.Contains(clientIP) {
			// Check if there are zone filters assigned and if they match.
			if m.zones[i] == "" || zoneID == m.zones[i] {
				return true
			}
			zoneFilter = false
		}
	}
	if !zoneFilter {
		m.logger.Debug("zone ID from remote did not match", zap.String("zone", zoneID))
	}
	return false
}
// Match returns true if r matches m.
Match returns true if r matches m.
// Match returns true if r matches m .
func (m MatchRemoteIP) Match(r *http.Request) bool {
	clientIP, zoneID, err := m.getClientIP(r)
	if err != nil {
		m.logger.Error("getting client IP", zap.Error(err))
		return false
	}
	zoneFilter := true
	for i, ipRange := range m.cidrs {
		if ipRange.Contains(clientIP) {
			if m.zones[i] == "" || zoneID == m.zones[i] {
				return true
			}
			zoneFilter = false
		}
	}
	if !zoneFilter {
		m.logger.Debug("zone ID from remote did not match", zap.String("zone", zoneID))
	}
	return false
}
func ( m MatchRemoteIP ) Match ( r * http . Request ) bool { clientIP , zoneID , err := m . getClientIP ( r ) if err != nil { m . logger . Error ( " " , zap . Error ( err ) ) return false } zoneFilter := true for i , ipRange := range m . cidrs { if ipRange . Contains ( clientIP ) { if m . zones [ i ] == " " || zoneID == m . zones [ i ] { return true } zoneFilter = false } } if ! zoneFilter { m . logger . Debug ( " " , zap . String ( " " , zoneID ) ) } return false }
Match returns true if r matches m.
Match returns true if r matches m .
// Check if there are zone filters assigned and if they match.