fix(health): add /api/v1/health endpoint for healthchecks
Health endpoint required for Docker Compose and Kubernetes healthchecks. Returns simple JSON with status, timestamp, and service name. Placed before other routes to minimize middleware overhead. No authentication required as this is a public health status endpoint. Fixes: P1.6 from audit AUDIT_TEMP_29_01_2026.md
This commit is contained in:
parent
62a6b3a528
commit
50ce55f856
1 changed files with 10 additions and 0 deletions
|
|
@ -262,6 +262,16 @@ func (r *APIRouter) Setup(router *gin.Engine) error {
|
|||
// BE-SVC-019: Apply version middleware to API routes
|
||||
router.Use(VersionMiddleware(r.versionManager))
|
||||
|
||||
// P1.6: Health endpoint for Docker/K8s healthchecks
|
||||
// Must be before other routes to avoid middleware overhead
|
||||
router.GET("/api/v1/health", func(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"status": "ok",
|
||||
"timestamp": time.Now().Unix(),
|
||||
"service": "veza-backend-api",
|
||||
})
|
||||
})
|
||||
|
||||
// Routes core publiques (health, metrics, upload info)
|
||||
r.setupCorePublicRoutes(router)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue