Added CORS support for the monitoring server

This commit is contained in:
Pierre Mdawar
2023-08-23 16:47:30 +03:00
parent 5a926f1911
commit e5836fc98d
2 changed files with 9 additions and 1 deletions

View File

@@ -2313,6 +2313,7 @@ func ResponseHandler(w http.ResponseWriter, r *http.Request, data []byte) {
} else {
// Otherwise JSON
w.Header().Set("Content-Type", "application/json")
w.Header().Set("Access-Control-Allow-Origin", "*")
w.Write(data)
}
}