mirror of
https://github.com/labstack/echo.git
synced 2025-03-11 14:49:56 +02:00
Update dummy group path to include exact prefix
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
parent
8e421d9773
commit
b338075a0f
2
echo.go
2
echo.go
@ -213,7 +213,7 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
version = "3.2.5"
|
version = "3.2.6"
|
||||||
website = "https://echo.labstack.com"
|
website = "https://echo.labstack.com"
|
||||||
// http://patorjk.com/software/taag/#p=display&f=Small%20Slant&t=Echo
|
// http://patorjk.com/software/taag/#p=display&f=Small%20Slant&t=Echo
|
||||||
banner = `
|
banner = `
|
||||||
|
8
group.go
8
group.go
@ -20,9 +20,11 @@ func (g *Group) Use(middleware ...MiddlewareFunc) {
|
|||||||
g.middleware = append(g.middleware, middleware...)
|
g.middleware = append(g.middleware, middleware...)
|
||||||
// Allow all requests to reach the group as they might get dropped if router
|
// 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.
|
// doesn't find a match, making none of the group middleware process.
|
||||||
g.echo.Any(path.Clean(g.prefix+"/*"), func(c Context) error {
|
for _, p := range []string{"", "/*"} {
|
||||||
return NotFoundHandler(c)
|
g.echo.Any(path.Clean(g.prefix+p), func(c Context) error {
|
||||||
}, g.middleware...)
|
return NotFoundHandler(c)
|
||||||
|
}, g.middleware...)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// CONNECT implements `Echo#CONNECT()` for sub-routes within the Group.
|
// CONNECT implements `Echo#CONNECT()` for sub-routes within the Group.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user