mirror of
https://github.com/labstack/echo.git
synced 2024-11-28 08:38:39 +02:00
Middleware with options - 2
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
parent
f5a385b547
commit
4f45cd1517
@ -31,6 +31,16 @@ func main() {
|
||||
return false
|
||||
}))
|
||||
|
||||
//-------
|
||||
// Slash
|
||||
//-------
|
||||
|
||||
e.Use(mw.StripTrailingSlash())
|
||||
|
||||
// or
|
||||
|
||||
// e.Use(mw.RedirectToSlash())
|
||||
|
||||
// Routes
|
||||
e.Get("/", hello)
|
||||
|
||||
|
@ -163,7 +163,9 @@ h := func(*echo.Context) *HTTPError {
|
||||
e.Get("/users/:id", h)
|
||||
```
|
||||
|
||||
<!-- ## Middleware -->
|
||||
## (Middleware)[https://github.com/labstack/echo/tree/master/examples/middleware]
|
||||
|
||||
*WIP*
|
||||
|
||||
## Response
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user