mirror of
https://github.com/restic/rest-server.git
synced 2025-10-19 07:33:21 +00:00
Add /healthz endpoint to server
This commit is contained in:
parent
8523f0c968
commit
1d7da8dd37
1 changed files with 3 additions and 0 deletions
3
mux.go
3
mux.go
|
@ -98,6 +98,9 @@ func NewHandler(server *Server) (http.Handler, error) {
|
|||
mux.HandleFunc("/metrics", server.wrapMetricsAuth(promhttp.Handler().ServeHTTP))
|
||||
}
|
||||
}
|
||||
mux.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(http.StatusNoContent)
|
||||
})
|
||||
mux.Handle("/", server)
|
||||
|
||||
var handler http.Handler = mux
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue