set correct content-type header when returning json status

This commit is contained in:
Matthias Radestock committed 2015-07-05 19:25:28 +01:00
1 parent 098fc81825
commit c8bd47e948
1 file changed
+1
+1
View File
@@ -261,6 +261,7 @@ func handleHTTP(router *weave.Router, httpAddr string, allocator *ipam.Allocator
muxRouter.Methods("GET").Path("/status").Headers("Accept", "application/json").HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
json, _ := router.StatusJSON(version)
w.Header().Set("Content-Type", "application/json")
w.Write(json)
})