From 1d7da8dd3737b4c770969d42474422fac8677e90 Mon Sep 17 00:00:00 2001 From: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> Date: Sun, 5 Nov 2023 17:32:58 -0800 Subject: [PATCH] Add /healthz endpoint to server --- mux.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mux.go b/mux.go index 77fcdb40..a7d3da80 100644 --- a/mux.go +++ b/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