glanceapp / glance

A self-hosted dashboard that puts all your feeds in one place
GNU Affero General Public License v3.0
8.56k stars 297 forks source link

Feature Request - Add a healthcheck route #226

Closed xunleii closed 1 month ago

xunleii commented 1 month ago

First of all, thanks for this awesome starte page!

Is there a route for a health check that returns 200 when Glance is running? I didn't see one in the code. A possible usecase for this route would be a Kubernetes probe or when Glance is behind a loadbalancer.

Sure, we could use the /, but depending on what's on the first page, that could be cumbersome to execute and consume resources for nothing.

If it didn't exists, a simple mux.HandleFunc("GET /api/healthz", func (w http.ResponseWriter, _ *http.Request) {w.WriteHeader(http.Ok)}) should be enough.

svilenmarkov commented 1 month ago

Thanks for the idea! I've added the endpoint in the new v0.6.2 release.