feat: add a ping endpoint that doesn't create a session
This commit is contained in:
@@ -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()))
|
restScan := ctrl.Path(fmt.Sprintf("/rest/startScan.view?%s", r.URL.Query().Encode()))
|
||||||
http.Redirect(w, r, restScan, http.StatusSeeOther)
|
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) {
|
func setupAdmin(r *mux.Router, ctrl *ctrladmin.Controller) {
|
||||||
|
|||||||
Reference in New Issue
Block a user