From 2ff421188eae1331005aaca4479c3b9ea64537a8 Mon Sep 17 00:00:00 2001 From: Livio Amstutz Date: Mon, 2 Dec 2019 16:14:52 +0100 Subject: [PATCH] set content header in marshalJSON --- pkg/utils/marshal.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/utils/marshal.go b/pkg/utils/marshal.go index 8c9427b..e279341 100644 --- a/pkg/utils/marshal.go +++ b/pkg/utils/marshal.go @@ -13,6 +13,7 @@ func MarshalJSON(w http.ResponseWriter, i interface{}) { http.Error(w, err.Error(), http.StatusInternalServerError) return } + w.Header().Set("content-type", "application/json") _, err = w.Write(b) if err != nil { logrus.Error("error writing response")