MCPcopy Index your code
hub / github.com/cortexproject/cortex / Wrap

Method Wrap

pkg/api/middlewares.go:47–52  ·  view source on GitHub ↗

Wrap implements Middleware

(next http.Handler)

Source from the content-addressed store, hash-verified

45
46// Wrap implements Middleware
47func (h HTTPHeaderMiddleware) Wrap(next http.Handler) http.Handler {
48 return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
49 r = h.injectRequestContext(r)
50 next.ServeHTTP(w, r)
51 })
52}

Callers 1

NewQuerierHandlerFunction · 0.95

Calls 2

injectRequestContextMethod · 0.95
ServeHTTPMethod · 0.45

Tested by

no test coverage detected