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

Method Match

modules/caddyhttp/ip_matchers.go:146–152  ·  view source on GitHub ↗

Match returns true if r matches m.

(r *http.Request)

Source from the content-addressed store, hash-verified

144
145// Match returns true if r matches m.
146func (m MatchRemoteIP) Match(r *http.Request) bool {
147 match, err := m.MatchWithError(r)
148 if err != nil {
149 SetVar(r.Context(), MatcherErrorVarKey, err)
150 }
151 return match
152}
153
154// MatchWithError returns true if r matches m.
155func (m MatchRemoteIP) MatchWithError(r *http.Request) (bool, error) {

Callers

nothing calls this directly

Calls 2

MatchWithErrorMethod · 0.95
SetVarFunction · 0.85

Tested by

no test coverage detected