MCPcopy Index your code
hub / github.com/github/github-mcp-server / withInsiders

Function withInsiders

pkg/http/handler.go:175–180  ·  view source on GitHub ↗

withInsiders is middleware that sets insiders mode in the request context

(next http.Handler)

Source from the content-addressed store, hash-verified

173
174// withInsiders is middleware that sets insiders mode in the request context
175func withInsiders(next http.Handler) http.Handler {
176 return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
177 ctx := ghcontext.WithInsidersMode(r.Context(), true)
178 next.ServeHTTP(w, r.WithContext(ctx))
179 })
180}
181
182func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
183 inv, err := h.inventoryFactoryFunc(r)

Callers

nothing calls this directly

Calls 1

ServeHTTPMethod · 0.80

Tested by

no test coverage detected