Skip to content

Commit b338075

Browse files
committed
Update dummy group path to include exact prefix
Signed-off-by: Vishal Rana <[email protected]>
1 parent 8e421d9 commit b338075

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

echo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ const (
213213
)
214214

215215
const (
216-
version = "3.2.5"
216+
version = "3.2.6"
217217
website = "https://echo.labstack.com"
218218
// http://patorjk.com/software/taag/#p=display&f=Small%20Slant&t=Echo
219219
banner = `

group.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ func (g *Group) Use(middleware ...MiddlewareFunc) {
2020
g.middleware = append(g.middleware, middleware...)
2121
// Allow all requests to reach the group as they might get dropped if router
2222
// doesn't find a match, making none of the group middleware process.
23-
g.echo.Any(path.Clean(g.prefix+"/*"), func(c Context) error {
24-
return NotFoundHandler(c)
25-
}, g.middleware...)
23+
for _, p := range []string{"", "/*"} {
24+
g.echo.Any(path.Clean(g.prefix+p), func(c Context) error {
25+
return NotFoundHandler(c)
26+
}, g.middleware...)
27+
}
2628
}
2729

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

0 commit comments

Comments
 (0)