mirror of
https://github.com/restic/rest-server.git
synced 2026-10-17 16:01:49 -07:00
Add /healthz endpoint to server (#259)
Co-authored-by: Michael Eischer <michael.eischer@fau.de>
This commit is contained in:
co-authored by
Michael Eischer
parent
a0da64d6cc
commit
652b604c90
@@ -112,6 +112,9 @@ func NewHandler(server *Server) (http.Handler, error) {
|
||||
mux.HandleFunc("/metrics", server.wrapMetricsAuth(promhttp.Handler().ServeHTTP))
|
||||
}
|
||||
}
|
||||
mux.HandleFunc("/healthz", func(w http.ResponseWriter, _ *http.Request) {
|
||||
w.WriteHeader(http.StatusNoContent)
|
||||
})
|
||||
mux.Handle("/", server)
|
||||
|
||||
var handler http.Handler = mux
|
||||
|
||||
Reference in New Issue
Block a user