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)
| 31 | // |
| 32 | // If a request is not an ACME HTTP challenge, h will be invoked. |
| 33 | func (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 |
no test coverage detected