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

Interface RequestMatcher

modules/caddyhttp/caddyhttp.go:43–45  ·  modules/caddyhttp/caddyhttp.go::RequestMatcher

RequestMatcher is a type that can match to a request. A route matcher MUST NOT modify the request, with the only exception being its context. Deprecated: Matchers should now implement RequestMatcherWithError. You may remove any interface guards for RequestMatcher but keep your Match() methods for b

Source from the content-addressed store, hash-verified

41// You may remove any interface guards for RequestMatcher
42// but keep your Match() methods for backwards compatibility.
43type RequestMatcher interface {
44 Match(*http.Request) bool
45}
46
47// RequestMatcherWithError is like RequestMatcher but can return an error.
48// An error during matching will abort the request middleware chain and

Callers 8

TestResponseMatcherFunction · 0.65
MatchMethod · 0.65
MatchWithErrorMethod · 0.65
MatchWithErrorMethod · 0.65
MatchWithErrorMethod · 0.65
MatchWithErrorMethod · 0.65
CELMatcherDecoratorFunction · 0.65

Implementers 14

MatchRegexpmodules/caddytls/matchers.go
MatchServerNameREmodules/caddytls/matchers.go
MatchRemoteIPmodules/caddytls/matchers.go
MatchLocalIPmodules/caddytls/matchers.go
MatchRemoteIPmodules/caddyhttp/ip_matchers.go
MatchClientIPmodules/caddyhttp/ip_matchers.go
ResponseMatchermodules/caddyhttp/responsematchers.go
MatchPathREmodules/caddyhttp/matchers.go
MatchTLSmodules/caddyhttp/matchers.go
MatchNotmodules/caddyhttp/matchers.go
MatchRegexpmodules/caddyhttp/matchers.go
MatchExpressionmodules/caddyhttp/celmatcher.go

Calls

no outgoing calls

Tested by

no test coverage detected