From 25f1907fc3f7ac47ea19db23cd8edcb71b58ef0f Mon Sep 17 00:00:00 2001 From: eduard256 Date: Thu, 19 Mar 2026 11:25:57 +0000 Subject: [PATCH] Register HEAD route for health endpoint in chi router --- internal/api/routes.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/api/routes.go b/internal/api/routes.go index 7312079..bd643d3 100644 --- a/internal/api/routes.go +++ b/internal/api/routes.go @@ -138,8 +138,10 @@ func (s *Server) setupRoutes() { }) // API routes (mounted at /api/v1 in main.go) - // Health check - s.router.Get("/health", handlers.NewHealthHandler(s.config.Version, s.logger).ServeHTTP) + // Health check (GET + HEAD for Docker/CasaOS healthcheck compatibility) + healthHandler := handlers.NewHealthHandler(s.config.Version, s.logger).ServeHTTP + s.router.Get("/health", healthHandler) + s.router.Head("/health", healthHandler) // Camera search s.router.Post("/cameras/search", handlers.NewSearchHandler(s.searchEngine, s.logger).ServeHTTP)