feat(http): Add health check endpoint

Add /_/healthz endpoint that returns 200 OK for service health monitoring.
This commit is contained in:
Björn Benouarets
2025-11-14 17:43:41 +01:00
parent 5aa4feb478
commit 896b28a4e1

View File

@@ -19,6 +19,11 @@ type Config struct {
func main() {
config := loadConfig()
http.HandleFunc("/_/healthz", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
w.Write([]byte("OK"))
})
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
proxyHandler(w, r, config)
})