MCPcopy
hub / github.com/caddyserver/caddy / MatchClientIP

Struct MatchClientIP

modules/caddyhttp/ip_matchers.go:50–59  ·  view source on GitHub ↗

MatchClientIP matches requests by the client IP address, i.e. the resolved address, considering trusted proxies.

Source from the content-addressed store, hash-verified

48// MatchClientIP matches requests by the client IP address,
49// i.e. the resolved address, considering trusted proxies.
50type MatchClientIP struct {
51 // The IPs or CIDR ranges to match.
52 Ranges []string `json:"ranges,omitempty"`
53
54 // cidrs and zones vars should aligned always in the same
55 // length and indexes for matching later
56 cidrs []*netip.Prefix
57 zones []string
58 logger *zap.Logger
59}
60
61func init() {
62 caddy.RegisterModule(MatchRemoteIP{})

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected