1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-22 20:06:21 +02:00

Revert "fixed #675"

This reverts commit 5a04f8add5.
This commit is contained in:
Vishal Rana 2016-10-22 15:27:04 -07:00
parent 5a04f8add5
commit 7c118eb4e3

View File

@ -16,11 +16,11 @@ type (
// Use implements `Echo#Use()` for sub-routes within the Group. // Use implements `Echo#Use()` for sub-routes within the Group.
func (g *Group) Use(m ...MiddlewareFunc) { func (g *Group) Use(m ...MiddlewareFunc) {
g.middleware = append(g.middleware, m...) g.middleware = append(g.middleware, m...)
// Allow requests `/prefix & /prefix/*` to reach the group as they might get // Allow all requests to reach the group as they might get dropped if router
// dropped if router doesn't find a match, making none of the group middleware // doesn't find a match, making none of the group middleware process.
// execute. g.echo.Any(g.prefix+"*", func(c Context) error {
g.echo.Any(g.prefix, NotFoundHandler, g.middleware...) return ErrNotFound
g.echo.Any(g.prefix+"/*", NotFoundHandler, g.middleware...) }, g.middleware...)
} }
// CONNECT implements `Echo#CONNECT()` for sub-routes within the Group. // CONNECT implements `Echo#CONNECT()` for sub-routes within the Group.