diff --git a/CHANGELOG.md b/CHANGELOG.md index ae00f5b..8543659 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.0.11] - 2026-03-19 + +### Added +- Project icon assets (SVG, 192x192 PNG, 512x512 PNG) for use in app stores and integrations + +### Fixed +- Health endpoint now accepts HEAD requests for Docker and CasaOS healthcheck compatibility +- Registered HEAD route in chi router for /api/v1/health endpoint + ## [1.0.10] - 2026-03-17 ### Added diff --git a/assets/icon-192.png b/assets/icon-192.png new file mode 100644 index 0000000..6546b43 Binary files /dev/null and b/assets/icon-192.png differ diff --git a/assets/icon-512.png b/assets/icon-512.png new file mode 100644 index 0000000..9eff9af Binary files /dev/null and b/assets/icon-512.png differ diff --git a/assets/icon.svg b/assets/icon.svg new file mode 100644 index 0000000..f203af2 --- /dev/null +++ b/assets/icon.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/internal/api/handlers/health.go b/internal/api/handlers/health.go index a12ff45..24fb370 100644 --- a/internal/api/handlers/health.go +++ b/internal/api/handlers/health.go @@ -43,7 +43,7 @@ func NewHealthHandler(version string, logger interface{ Info(string, ...any) }) // ServeHTTP handles health check requests func (h *HealthHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { - if r.Method != http.MethodGet { + if r.Method != http.MethodGet && r.Method != http.MethodHead { http.Error(w, "Method not allowed", http.StatusMethodNotAllowed) return } 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)