aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Borg <jakob@kastelo.net>2023-07-01 07:52:46 +0200
committerJakob Borg <jakob@kastelo.net>2023-07-01 07:53:50 +0200
commit229b6a292c3b7844cbe38470deaca5f7cc63e631 (patch)
tree6d7ac5fc1e497ffc37c196bfaa8e05ed8ed2a228
parentc84e47a7b21cc5ae3db4775e1191fb27d2970ff8 (diff)
downloadsyncthing-229b6a292c3b7844cbe38470deaca5f7cc63e631.tar.gz
syncthing-229b6a292c3b7844cbe38470deaca5f7cc63e631.zip
cmd/stcrashreceiver: Add /ping endpoint
-rw-r--r--cmd/stcrashreceiver/main.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/stcrashreceiver/main.go b/cmd/stcrashreceiver/main.go
index 15f48c17b..ec57e9e9b 100644
--- a/cmd/stcrashreceiver/main.go
+++ b/cmd/stcrashreceiver/main.go
@@ -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")))