Skip to content

Commit ca50e26

Browse files
committed
[docs] fix trailing slash problem
1 parent bfb2360 commit ca50e26

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.dockerignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,7 @@ tmp/
4848

4949
# Ignore build and deployments directories
5050
deployments/
51-
build/
51+
build/
52+
53+
# Example requests files
54+
*.http

internal/sms-gateway/handlers/root.go

+8
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ type rootHandler struct {
99
}
1010

1111
func (h *rootHandler) Register(app *fiber.App) {
12+
app.Use(func(c *fiber.Ctx) error {
13+
if c.Path() == "/api" {
14+
return c.Redirect("/api/", fiber.StatusMovedPermanently)
15+
}
16+
17+
return c.Next()
18+
})
19+
1220
h.healthHandler.Register(app)
1321
app.Static("/api", "api")
1422
}

0 commit comments

Comments
 (0)