diff --git a/backend/internal/handler/routes.go b/backend/internal/handler/routes.go index 322ff3b..972330d 100644 --- a/backend/internal/handler/routes.go +++ b/backend/internal/handler/routes.go @@ -84,6 +84,18 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { rest.WithPrefix("/api/v1"), ) + // 额外的根路径健康检查,用于Caddy等反向代理 + server.AddRoutes( + []rest.Route{ + { + // 根路径健康检查 + Method: http.MethodGet, + Path: "/health", + Handler: health.HealthHandler(serverCtx), + }, + }, + ) + server.AddRoutes( []rest.Route{ {