tsweb: jsonhandler: fix content type

Signed-off-by: Zijie Lu <zijie@tailscale.com>
This commit is contained in:
Zijie Lu
2020-07-14 15:27:26 -04:00
parent 23123907c0
commit c9e40abfb8
2 changed files with 5 additions and 1 deletions

View File

@ -32,8 +32,8 @@ func responseError(e string) *response {
func writeResponse(w http.ResponseWriter, s int, resp *response) {
b, _ := json.Marshal(resp)
w.WriteHeader(s)
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(s)
w.Write(b)
}