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

Method ServeHTTP

modules/caddypki/acmeserver/acmeserver.go:235–251  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler)

Source from the content-addressed store, hash-verified

233}
234
235func (ash Handler) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error {
236 if strings.HasPrefix(r.URL.Path, ash.PathPrefix) {
237 acmeCtx := acme.NewContext(
238 r.Context(),
239 ash.acmeDB,
240 ash.acmeClient,
241 ash.acmeLinker,
242 nil,
243 )
244 acmeCtx = authority.NewContext(acmeCtx, ash.acmeAuth)
245 r = r.WithContext(acmeCtx)
246
247 ash.acmeEndpoints.ServeHTTP(w, r)
248 return nil
249 }
250 return next.ServeHTTP(w, r)
251}
252
253func (ash Handler) getDatabaseKey() string {
254 key := ash.CA

Callers

nothing calls this directly

Calls 1

ServeHTTPMethod · 0.65

Tested by

no test coverage detected