(next http.Handler)
| 223 | } |
| 224 | |
| 225 | func 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. |