From 8a17fcf59f8fdceb586e3d08d9b96dc29e8c5dbe Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Sat, 30 May 2020 23:25:40 +0100 Subject: [PATCH] Be a good citizen and set the header in the reply --- cmd/rove-server/router.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/rove-server/router.go b/cmd/rove-server/router.go index dbecf4b..ecb1846 100644 --- a/cmd/rove-server/router.go +++ b/cmd/rove-server/router.go @@ -27,5 +27,10 @@ func HandleStatus(w http.ResponseWriter, r *http.Request) { Ready: true, } + // Be a good citizen and set the header for the return + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) + + // Reply with the current status json.NewEncoder(w).Encode(status) }