Skip to content

Commit 6322745

Browse files
committed
LAPI body limit linting (#4462)
1 parent 54a0dfe commit 6322745

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/apiserver/middlewares/v1/body_limit.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ const (
1313
AuthenticatedBodyLimit int64 = 50 * 1024 * 1024 // 50 MiB
1414
)
1515

16-
func BodyLimit(max int64) gin.HandlerFunc {
16+
func BodyLimit(maxSize int64) gin.HandlerFunc {
1717
return func(c *gin.Context) {
1818
if c.Request.Body != nil {
19-
c.Request.Body = http.MaxBytesReader(c.Writer, c.Request.Body, max)
19+
c.Request.Body = http.MaxBytesReader(c.Writer, c.Request.Body, maxSize)
2020
}
2121
c.Next()
2222
}

0 commit comments

Comments
 (0)