summaryrefslogtreecommitdiff
path: root/service/http/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'service/http/config.go')
-rw-r--r--service/http/config.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/service/http/config.go b/service/http/config.go
index 711939b7..7549cb6c 100644
--- a/service/http/config.go
+++ b/service/http/config.go
@@ -17,8 +17,11 @@ type Config struct {
// SSL defines https server options.
SSL SSLConfig
+ // MaxRequest specified max size for payload body in megabytes, set 0 to unlimited.
+ // Deprecated: use `maxRequestSize` instead
+ MaxRequest int64
+
// MaxRequestSize specified max size for payload body in megabytes, set 0 to unlimited.
- MaxRequest int64
MaxRequestSize int64
// Uploads configures uploads configuration.
@@ -118,6 +121,7 @@ func (c *Config) Valid() error {
return nil
}
+// Perform merge operations for deprecated params to provide backward compatibility
func (c *Config) mergeBackwardCompatibility() {
if c.MaxRequestSize == 0 && c.MaxRequest != 0 {
c.MaxRequestSize = c.MaxRequest