Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion control-plane/internal/server/middleware/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func APIKeyAuth(config AuthConfig) gin.HandlerFunc {
}

// Always allow health and metrics by default
if strings.HasPrefix(c.Request.URL.Path, "/api/v1/health") || c.Request.URL.Path == "/metrics" {
if strings.HasPrefix(c.Request.URL.Path, "/api/v1/health") || c.Request.URL.Path == "/health" || c.Request.URL.Path == "/metrics" {
c.Next()
return
}
Expand Down
3 changes: 3 additions & 0 deletions control-plane/internal/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,9 @@ func (s *AgentFieldServer) setupRoutes() {
// Expose Prometheus metrics
s.Router.GET("/metrics", gin.WrapH(promhttp.Handler()))

// Public health check endpoint for load balancers and container orchestration (e.g., Railway, K8s)
s.Router.GET("/health", s.healthCheckHandler)

// Serve UI files - embedded or filesystem based on availability
if s.config.UI.Enabled {
// Check if UI is embedded in the binary
Expand Down
Loading