mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-07-21 17:37:54 -05:00
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.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user