summaryrefslogtreecommitdiff
path: root/plugins/http/config.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-01-15 00:52:09 +0300
committerGitHub <[email protected]>2021-01-15 00:52:09 +0300
commit83e510d734815968a998fa8e4c14ac0900b9c485 (patch)
tree50dc6e22db7ff51b0fcf3cce0a45b7b739e1f300 /plugins/http/config.go
parent7542ae2d4c392290766405d31996378378aad975 (diff)
parentd4a067d1fdc4911cb5467620da981fca3dc4cc08 (diff)
Merge pull request #476 from spiral/fix/use_mapstructure_instead_yaml_tagsv2.0.0-beta7
fix(yaml): Use mapstructure structure tags instead of yaml
Diffstat (limited to 'plugins/http/config.go')
-rw-r--r--plugins/http/config.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/http/config.go b/plugins/http/config.go
index abde8917..e272e550 100644
--- a/plugins/http/config.go
+++ b/plugins/http/config.go
@@ -49,16 +49,16 @@ type Config struct {
HTTP2 *HTTP2Config
// MaxRequestSize specified max size for payload body in megabytes, set 0 to unlimited.
- MaxRequestSize uint64 `yaml:"max_request_size"`
+ MaxRequestSize uint64 `mapstructure:"max_request_size"`
// TrustedSubnets declare IP subnets which are allowed to set ip using X-Real-Ip and X-Forwarded-For
- TrustedSubnets []string `yaml:"trusted_subnets"`
+ TrustedSubnets []string `mapstructure:"trusted_subnets"`
// Uploads configures uploads configuration.
Uploads *UploadsConfig
// Pool configures worker pool.
- Pool *poolImpl.Config
+ Pool *poolImpl.Config `mapstructure:"pool"`
// Env is environment variables passed to the http pool
Env map[string]string
@@ -85,7 +85,7 @@ type HTTP2Config struct {
H2C bool
// MaxConcurrentStreams defaults to 128.
- MaxConcurrentStreams uint32 `yaml:"max_concurrent_streams"`
+ MaxConcurrentStreams uint32 `mapstructure:"max_concurrent_streams"`
}
// InitDefaults sets default values for HTTP/2 configuration.