MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / appJSONContentType

Function appJSONContentType

internal/server/app_api.go:225–231  ·  view source on GitHub ↗
(next http.Handler)

Source from the content-addressed store, hash-verified

223}
224
225func appJSONContentType(next http.Handler) http.Handler {
226 return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
227 w.Header().Set("Content-Type", "application/json")
228 w.Header().Set("Cache-Control", "no-store")
229 next.ServeHTTP(w, r)
230 })
231}
232
233// requireAppsAvailable answers every app route with the same JSON 404 while
234// installed apps are off on this server.

Callers

nothing calls this directly

Calls 3

SetMethod · 0.45
HeaderMethod · 0.45
ServeHTTPMethod · 0.45

Tested by

no test coverage detected