-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
Description
Issue Description
I have a group with a certain prefix like “/api/root”.
Now, I’m adding paths to this group.
myGroup.GET("/", myHandler1)
myGroup.GET("/path", myHandler2)
Checklist
- Dependencies installed
- No typos
- Searched existing issues and docs
Expected behaviour
myHandler one handles both ”/api/root/" and “/api/root”
Actual behaviour
myHandler one will only respond to ”/api/root/", but not “/api/root”
This is more of a question (I also asked it in the forums roughly 2 weeks ago), as I'm not sure what's the intended behavior here.
router := echo.New()
myGroup := router.Group("/api/root")
myGroup.GET("/pages", api.FindPages)
myGroup.GET("/", api.GetIndex)
At the moment I need to add
myGroup.GET("", api.GetIndex)
To make sure /api/root/
and /api/root
behave the same way.
ghaabor, slaveofcode, choopm, dankobg, Dattaya and 1 more