Skip to content

Commit

Permalink
increase size limit for MG response
Browse files Browse the repository at this point in the history
  • Loading branch information
Neur0toxine authored May 3, 2023
2 parents 30d1155 + cd95343 commit f9ebf63
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion v1/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ import (
)

const MB = 1 << 20
const LimitResponse = 3 * MB

func buildLimitedRawResponse(resp *http.Response) ([]byte, error) {
defer resp.Body.Close()

limitReader := io.LimitReader(resp.Body, MB)
limitReader := io.LimitReader(resp.Body, LimitResponse)
body, err := ioutil.ReadAll(limitReader)

if err != nil {
Expand Down

0 comments on commit f9ebf63

Please sign in to comment.