Open mei-rune opened 2 years ago
Hi @runner-mei , this may be controversial advice but you can copy the RemoveTrailingSlash
middleware code and create you own middleware out of it and strip/change everything you need.
@aldas add a option to control change or no change?
Issue Description
Can don't change req.RequestURI in middleware.RemoveTrailingSlash()?
My app has a variable url prefix, the url prefix can change by config file. So I add e.Pre(middleware.RemoveTrailingSlash())
my code is:
but I add middleware.RemoveTrailingSlash(), and cannot get raw RequestURI in my codes.
Can fix it https://github.com/labstack/echo/blob/master/middleware/slash.go#L63 https://github.com/labstack/echo/blob/master/middleware/slash.go#L67
Checklist