From 7c118eb4e325dd003dd8329cdd1a10357bc7f451 Mon Sep 17 00:00:00 2001 From: Vishal Rana Date: Sat, 22 Oct 2016 15:27:04 -0700 Subject: [PATCH] Revert "fixed #675" This reverts commit 5a04f8add55f36ba9853a4fb883b72e024989a21. --- group.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/group.go b/group.go index 0d857364..bd467a4f 100644 --- a/group.go +++ b/group.go @@ -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 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...) + // 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...) } // CONNECT implements `Echo#CONNECT()` for sub-routes within the Group.