(ip netip.Addr, ranges []netip.Prefix)
| 388 | } |
| 389 | |
| 390 | func (MatchRemoteIP) matches(ip netip.Addr, ranges []netip.Prefix) bool { |
| 391 | return slices.ContainsFunc(ranges, func(prefix netip.Prefix) bool { |
| 392 | return prefix.Contains(ip) |
| 393 | }) |
| 394 | } |
| 395 | |
| 396 | // UnmarshalCaddyfile sets up the MatchRemoteIP from Caddyfile tokens. Syntax: |
| 397 | // |