Skip to content

Commit

Permalink
add doc for multiple prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
efectn committed Nov 19, 2022
1 parent 1881483 commit ac695e2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/app.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ app.Use("/api", func(c *fiber.Ctx) error {
return c.Next()
})
// Match requests starting with /api or /home (multiple-prefix support)
app.Use([]string{"/api", "/home"}, func(c *fiber.Ctx) error {
return c.Next()
})
// Attach multiple handlers
app.Use("/api",func(c *fiber.Ctx) error {
c.Set("X-Custom-Header", random.String(32))
Expand Down

0 comments on commit ac695e2

Please sign in to comment.