mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-21 23:20:24 +00:00
feat(httpd): add new healthz endpoint
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
This commit is contained in:
parent
02ec3a5f48
commit
ec00613202
1 changed files with 6 additions and 0 deletions
|
@ -23,6 +23,12 @@ func GetHTTPRouter() http.Handler {
|
|||
func initializeRouter(staticFilesPath string, enableProfiler, enableWebAdmin bool) {
|
||||
router = chi.NewRouter()
|
||||
|
||||
router.Group(func(r chi.Router) {
|
||||
r.Get("/healthz", func(w http.ResponseWriter, r *http.Request) {
|
||||
render.PlainText(w, r, "ok")
|
||||
})
|
||||
})
|
||||
|
||||
router.Group(func(router chi.Router) {
|
||||
router.Use(middleware.RequestID)
|
||||
router.Use(middleware.RealIP)
|
||||
|
|
Loading…
Reference in a new issue