From 449291810963b424a0c74416ead54dd2d1545813 Mon Sep 17 00:00:00 2001 From: muXxer Date: Sat, 18 Feb 2023 12:19:48 +0100 Subject: [PATCH] Set default value of MaxBodyLength to "2M" --- config_defaults.json | 2 +- documentation/docs/configuration.md | 4 ++-- plugins/webapi/params.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config_defaults.json b/config_defaults.json index a4abc35ec5..c511c926f9 100755 --- a/config_defaults.json +++ b/config_defaults.json @@ -112,7 +112,7 @@ "timeout": "30s", "readTimeout": "10s", "writeTimeout": "10s", - "maxBodyLength": "1M" + "maxBodyLength": "2M" }, "debugRequestLoggerEnabled": false }, diff --git a/documentation/docs/configuration.md b/documentation/docs/configuration.md index 9e59d353c7..11c75addcd 100755 --- a/documentation/docs/configuration.md +++ b/documentation/docs/configuration.md @@ -418,7 +418,7 @@ Example: | timeout | The timeout after which a long running operation will be canceled | string | "30s" | | readTimeout | The read timeout for the HTTP request body | string | "10s" | | writeTimeout | The write timeout for the HTTP response body | string | "10s" | -| maxBodyLength | The maximum number of characters that the body of an API call may contain | string | "1M" | +| maxBodyLength | The maximum number of characters that the body of an API call may contain | string | "2M" | Example: @@ -446,7 +446,7 @@ Example: "timeout": "30s", "readTimeout": "10s", "writeTimeout": "10s", - "maxBodyLength": "1M" + "maxBodyLength": "2M" }, "debugRequestLoggerEnabled": false } diff --git a/plugins/webapi/params.go b/plugins/webapi/params.go index 17f112e1d5..06640e7003 100644 --- a/plugins/webapi/params.go +++ b/plugins/webapi/params.go @@ -17,7 +17,7 @@ type ParametersWebAPI struct { Timeout time.Duration `default:"30s" usage:"the timeout after which a long running operation will be canceled"` ReadTimeout time.Duration `default:"10s" usage:"the read timeout for the HTTP request body"` WriteTimeout time.Duration `default:"10s" usage:"the write timeout for the HTTP response body"` - MaxBodyLength string `default:"1M" usage:"the maximum number of characters that the body of an API call may contain"` + MaxBodyLength string `default:"2M" usage:"the maximum number of characters that the body of an API call may contain"` } DebugRequestLoggerEnabled bool `default:"false" usage:"whether the debug logging for requests should be enabled"`