feat: add a ping endpoint that doesn't create a session

This commit is contained in:
Walter Huf
2022-09-09 01:32:48 -07:00
committed by GitHub
parent 7d0d036f0b
commit 731a696bd7

View File

@@ -140,6 +140,9 @@ func setupMisc(r *mux.Router, ctrl *ctrlbase.Controller) {
restScan := ctrl.Path(fmt.Sprintf("/rest/startScan.view?%s", r.URL.Query().Encode()))
http.Redirect(w, r, restScan, http.StatusSeeOther)
})
r.HandleFunc("/ping", func(w http.ResponseWriter, r *http.Request) {
fmt.Fprint(w, "OK")
})
}
func setupAdmin(r *mux.Router, ctrl *ctrladmin.Controller) {