diff --git a/echo.go b/echo.go index 54f6dec0..d45144d8 100644 --- a/echo.go +++ b/echo.go @@ -225,7 +225,7 @@ const ( const ( // Version of Echo - Version = "4.1.0" + Version = "4.1.2" website = "https://echo.labstack.com" // http://patorjk.com/software/taag/#p=display&f=Small%20Slant&t=Echo banner = ` diff --git a/group.go b/group.go index 50b308a2..a14667e8 100644 --- a/group.go +++ b/group.go @@ -93,11 +93,13 @@ func (g *Group) Match(methods []string, path string, handler HandlerFunc, middle } // Group creates a new sub-group with prefix and optional sub-group-level middleware. -func (g *Group) Group(prefix string, middleware ...MiddlewareFunc) *Group { +func (g *Group) Group(prefix string, middleware ...MiddlewareFunc) (sg *Group) { m := make([]MiddlewareFunc, 0, len(g.middleware)+len(middleware)) m = append(m, g.middleware...) m = append(m, middleware...) - return g.echo.Group(g.prefix+prefix, m...) + sg = g.echo.Group(g.prefix+prefix, m...) + sg.host = g.host + return } // Static implements `Echo#Static()` for sub-routes within the Group.