MCPcopy
hub / github.com/dgraph-io/dgraph / commonHeaders

Function commonHeaders

graphql/admin/http.go:366–372  ·  view source on GitHub ↗
(next http.Handler)

Source from the content-addressed store, hash-verified

364}
365
366func commonHeaders(next http.Handler) http.Handler {
367 return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
368 x.AddCorsHeaders(w)
369 w.Header().Set("Content-Type", "application/json")
370 next.ServeHTTP(w, r)
371 })
372}
373
374func recoveryHandler(next http.Handler) http.Handler {
375

Callers 1

NewServerFunction · 0.85

Calls 3

AddCorsHeadersFunction · 0.92
ServeHTTPMethod · 0.80
SetMethod · 0.65

Tested by

no test coverage detected