Be a good citizen and set the header in the reply

This commit is contained in:
Marc Di Luzio 2020-05-30 23:25:40 +01:00
parent a26bd9ab4d
commit 8a17fcf59f

View file

@ -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)
}