Skip to content

Commit

Permalink
fix: set a sane value for MaxMultipartMemory (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarrosop authored Nov 15, 2022
1 parent 7381b3c commit fe1de57
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ func (ctrl *Controller) SetupRouter(
return nil, fmt.Errorf("problem setting trusted proxies: %w", err)
}

router.MaxMultipartMemory = 1000 << 20 //nolint:gomnd // 1GB
// lower values make uploads slower but keeps service memory usage low
router.MaxMultipartMemory = 8 << 20 //nolint:gomnd // 8 MB
router.Use(gin.Recovery())

for _, mw := range middleware {
Expand Down

0 comments on commit fe1de57

Please sign in to comment.