From 9a36187333649ddd84d256e1b225a95456a25957 Mon Sep 17 00:00:00 2001 From: Svilen Markov <7613769+svilenmarkov@users.noreply.github.com> Date: Sun, 29 Sep 2024 23:56:53 +0100 Subject: [PATCH] Add /api/healthz endpoint --- internal/glance/glance.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/glance/glance.go b/internal/glance/glance.go index d26745f..f47c66a 100644 --- a/internal/glance/glance.go +++ b/internal/glance/glance.go @@ -275,6 +275,9 @@ func (a *Application) Serve() error { mux.HandleFunc("GET /api/pages/{page}/content/{$}", a.HandlePageContentRequest) mux.HandleFunc("/api/widgets/{widget}/{path...}", a.HandleWidgetRequest) + mux.HandleFunc("GET /api/healthz", func(w http.ResponseWriter, _ *http.Request) { + w.WriteHeader(http.StatusOK) + }) mux.Handle( fmt.Sprintf("GET /static/%s/{path...}", a.Config.Server.AssetsHash),