Skip to content

Commit

Permalink
fixed labstack#675
Browse files Browse the repository at this point in the history
Signed-off-by: Vishal Rana <[email protected]>
  • Loading branch information
vishr committed Oct 22, 2016
1 parent 36251e8 commit 12573cd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 5 additions & 5 deletions group.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ type (
// Use implements `Echo#Use()` for sub-routes within the Group.
func (g *Group) Use(m ...MiddlewareFunc) {
g.middleware = append(g.middleware, m...)
// Allow all requests to reach the group as they might get dropped if router
// doesn't find a match, making none of the group middleware process.
g.echo.Any(g.prefix+"*", func(c Context) error {
return ErrNotFound
}, g.middleware...)
// Allow requests `/prefix & /prefix/*` to reach the group as they might get
// dropped if router doesn't find a match, making none of the group middleware
// execute.
g.echo.Any(g.prefix, NotFoundHandler, g.middleware...)
g.echo.Any(g.prefix+"/*", NotFoundHandler, g.middleware...)
}

// CONNECT implements `Echo#CONNECT()` for sub-routes within the Group.
Expand Down
2 changes: 2 additions & 0 deletions website/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build:
rm -rf public && hugo

0 comments on commit 12573cd

Please sign in to comment.