MCPcopy
hub / github.com/caddyserver/certmagic / HTTPChallengeHandler

Method HTTPChallengeHandler

httphandlers.go:33–40  ·  view source on GitHub ↗

HTTPChallengeHandler wraps h in a handler that can solve the ACME HTTP challenge. cfg is required, and it must have a certificate cache backed by a functional storage facility, since that is where the challenge state is stored between initiation and solution. If a request is not an ACME HTTP challe

(h http.Handler)

Source from the content-addressed store, hash-verified

31//
32// If a request is not an ACME HTTP challenge, h will be invoked.
33func (am *ACMEIssuer) HTTPChallengeHandler(h http.Handler) http.Handler {
34 return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
35 if am.HandleHTTPChallenge(w, r) {
36 return
37 }
38 h.ServeHTTP(w, r)
39 })
40}
41
42// HandleHTTPChallenge uses am to solve challenge requests from an ACME
43// server that were initiated by this instance or any other instance in

Callers 2

newACMEClientMethod · 0.95
HTTPSFunction · 0.80

Calls 1

HandleHTTPChallengeMethod · 0.95

Tested by

no test coverage detected