chore(api): remove charset declaration from JSON content-type (fixes #10500) (#10508)

updated content-type  to application/json (fixes #10500)

Signed-off-by: prathik8794 <me20b030@iittp.ac.in>
This commit is contained in:
Prathik P Kulkarni
2025-12-29 09:49:21 +00:00
committed by GitHub
parent 8f9ffd3c79
commit 50fe0053e8
+1 -1
View File
@@ -203,7 +203,7 @@ func (s *service) getListener(guiCfg config.GUIConfiguration) (net.Listener, err
}
func sendJSON(w http.ResponseWriter, jsonObject interface{}) {
w.Header().Set("Content-Type", "application/json; charset=utf-8")
w.Header().Set("Content-Type", "application/json")
// Marshalling might fail, in which case we should return a 500 with the
// actual error.
bs, err := json.MarshalIndent(jsonObject, "", " ")