From f76e405b6cf3a3399487b59a9b180fd9da454fca Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 15 Jul 2026 12:18:59 +0200 Subject: [PATCH] fix: disable echo group 404 auto-registration to keep pre-5.3.0 routing behavior echo v5.3.0 reverted to v4 behavior where every group with middleware implicitly registers a 404 route at its prefix. Our route setup creates multiple groups with the same prefix (rate-limit subgroups of /api/v1), which now panics with a duplicate-route error at startup. --- pkg/routes/routes.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/routes/routes.go b/pkg/routes/routes.go index bcdea1bdb..7d66d5df8 100644 --- a/pkg/routes/routes.go +++ b/pkg/routes/routes.go @@ -133,6 +133,10 @@ func NewEcho() *echo.Echo { Router: echo.NewRouter(echo.RouterConfig{ UnescapePathParamValues: true, }), + // Since echo v5.3.0 groups implicitly register 404 routes when middleware + // is added. Our route setup creates multiple groups with the same prefix + // (e.g. rate-limit subgroups of /api/v1), which would panic as duplicates. + NoGroupAutoRegister404Routes: true, }) // Configure IP extraction to prevent rate limit bypass via spoofed headers.