1
0
mirror of synced 2024-11-21 20:46:05 +03:00

increase limit size for response from MG

This commit is contained in:
Ефанов Руслан 2023-05-03 10:44:13 +03:00
parent 30d115504e
commit cd953438de

View File

@ -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 {