cmd/stcrashreceiver: Add /ping endpoint

This commit is contained in:
Jakob Borg 2023-07-01 07:52:46 +02:00
parent c84e47a7b2
commit 229b6a292c

View File

@ -69,6 +69,9 @@ func main() {
}
mux.Handle("/", cr)
mux.HandleFunc("/ping", func(w http.ResponseWriter, req *http.Request) {
w.Write([]byte("OK"))
})
if params.DSN != "" {
mux.HandleFunc("/newcrash/failure", handleFailureFn(params.DSN, filepath.Join(params.Dir, "failure_reports")))