diff --git a/internal/httpserver/handler.go b/internal/httpserver/handler.go index 745b1fb..c0a5860 100644 --- a/internal/httpserver/handler.go +++ b/internal/httpserver/handler.go @@ -152,6 +152,25 @@ func (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK) _, _ = w.Write(appsList) + return + case "info": + infoData := struct { + Branch string + Build string + CommitHash string + Version string + }{ + Branch: common.Branch, + Build: common.Build, + CommitHash: common.CommitHash, + Version: common.Version, + } + + infoBytes, _ := json.Marshal(infoData) + + w.WriteHeader(http.StatusOK) + _, _ = w.Write(infoBytes) + return case "metrics": handler, found := h.handlers[rInfo.Application]