Skip to content

Commit

Permalink
feat: router add bodylimit
Browse files Browse the repository at this point in the history
  • Loading branch information
bookpanda committed Jan 29, 2024
1 parent 32a8dcd commit b458a5f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ func NewAPIv1(r *FiberRouter, conf config.App) *fiber.App {
}

func NewFiberRouter(authGuard IGuard, conf config.App) *FiberRouter {
r := fiber.New(fiber.Config{})
r := fiber.New(fiber.Config{
AppName: "JohnJud API",
BodyLimit: int(conf.MaxFileSize * 1024 * 1024),
})

r.Use(cors.New(cors.Config{
AllowOrigins: "*",
Expand Down

0 comments on commit b458a5f

Please sign in to comment.