-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Description
Bug Description
Hi, I have a problem with running healthcheck middleware with a group:
package main
import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/compress"
"github.com/gofiber/fiber/v2/middleware/healthcheck"
"github.com/gofiber/fiber/v2/middleware/recover"
)
func main() {
app := fiber.New()
app.Use(recover.New())
app.Use(compress.New())
group := app.Group("/app")
group.Use(healthcheck.New())
group.Get("/hello", func(c *fiber.Ctx) error {
return c.SendString("Hello, World 👋!")
})
err := app.Listen(":5001")
if err != nil {
panic(err)
}
}localhost:5001/app/livezdoesn't work:curl localhost:5001/app/livez Cannot GET /app/livez
localhost:5001/app/helloworks
How to Reproduce
Steps to reproduce the behavior:
- Run the main file above
- Run curl localhost:5001/app/livez
- It returns not found.
Expected Behavior
The endpoint should return HTTP 200
Fiber Version
v2.52.0
Code Snippet (optional)
No response
Checklist:
- I agree to follow Fiber's Code of Conduct.
- I have checked for existing issues that describe my problem prior to opening this one.
- I understand that improperly formatted bug reports may be closed without explanation.
Reactions are currently unavailable