[docs] fix trailing slash problem

This commit is contained in:
Aleksandr Soloshenko 2024-08-14 06:32:32 +07:00 committed by Aleksandr
parent bfb2360504
commit ca50e26e39
2 changed files with 12 additions and 1 deletions

View File

@ -48,4 +48,7 @@ tmp/
# Ignore build and deployments directories
deployments/
build/
build/
# Example requests files
*.http

View File

@ -9,6 +9,14 @@ type rootHandler struct {
}
func (h *rootHandler) Register(app *fiber.App) {
app.Use(func(c *fiber.Ctx) error {
if c.Path() == "/api" {
return c.Redirect("/api/", fiber.StatusMovedPermanently)
}
return c.Next()
})
h.healthHandler.Register(app)
app.Static("/api", "api")
}