Add /-/healthy endpoint
This commit is contained in:
parent
6fa697ae17
commit
e8661f5768
|
@ -15,6 +15,7 @@ package ui
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
_ "net/http/pprof" // Comment this line to disable pprof endpoint.
|
||||
|
@ -76,6 +77,11 @@ func Register(r *route.Router, reloadCh chan<- struct{}, logger log.Logger) {
|
|||
reloadCh <- struct{}{}
|
||||
})
|
||||
|
||||
r.Get("/-/healthy", func(w http.ResponseWriter, _ *http.Request) {
|
||||
w.WriteHeader(http.StatusOK)
|
||||
fmt.Fprintf(w, "OK")
|
||||
})
|
||||
|
||||
r.Get("/debug/*subpath", http.DefaultServeMux.ServeHTTP)
|
||||
r.Post("/debug/*subpath", http.DefaultServeMux.ServeHTTP)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue