From cd953438de2df8e9643df4853435af5cc4680732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D1=84=D0=B0=D0=BD=D0=BE=D0=B2=20=D0=A0=D1=83=D1=81?= =?UTF-8?q?=D0=BB=D0=B0=D0=BD?= Date: Wed, 3 May 2023 10:44:13 +0300 Subject: [PATCH] increase limit size for response from MG --- v1/helpers.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/v1/helpers.go b/v1/helpers.go index f7f7904..fc1ba4a 100644 --- a/v1/helpers.go +++ b/v1/helpers.go @@ -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 {