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

Struct MatchRemoteIP

modules/caddyhttp/ip_matchers.go:37–46  ·  modules/caddyhttp/ip_matchers.go::MatchRemoteIP

MatchRemoteIP matches requests by the remote IP address, i.e. the IP address of the direct connection to Caddy.

Source from the content-addressed store, hash-verified

35// MatchRemoteIP matches requests by the remote IP address,
36// i.e. the IP address of the direct connection to Caddy.
37type MatchRemoteIP struct {
38 // The IPs or CIDR ranges to match.
39 Ranges []string `json:"ranges,omitempty"`
40
41 // cidrs and zones vars should aligned always in the same
42 // length and indexes for matching later
43 cidrs []*netip.Prefix
44 zones []string
45 logger *zap.Logger
46}
47
48// MatchClientIP matches requests by the client IP address,
49// i.e. the resolved address, considering trusted proxies.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected