Skip to content

Commit 655596b

Browse files
committed
Revert "Remove group.Use registering Any routes that break other routes"
This reverts commit f72eaa4
1 parent 628a2df commit 655596b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

group.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ func (g *Group) Use(middleware ...MiddlewareFunc) {
2323
if len(g.middleware) == 0 {
2424
return
2525
}
26+
// Allow all requests to reach the group as they might get dropped if router
27+
// doesn't find a match, making none of the group middleware process.
28+
g.Any("", NotFoundHandler)
29+
g.Any("/*", NotFoundHandler)
2630
}
2731

2832
// CONNECT implements `Echo#CONNECT()` for sub-routes within the Group.

0 commit comments

Comments
 (0)