Skip to content

Commit 75bb270

Browse files
committed
Set Content-Type on reflective api responses
1 parent 585fb9d commit 75bb270

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

api/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ func HandleRequest(path string, w http.ResponseWriter, r *http.Request) bool {
235235
logging.Error("API", "Failed to marshal json!", aurora.Cyan(err))
236236
}
237237

238+
w.Header().Set("Content-Type", "application/json")
238239
w.Header().Set("Content-Length", strconv.Itoa(len(jsonData)))
239240
w.WriteHeader(code)
240241
w.Write(jsonData)

0 commit comments

Comments
 (0)