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.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/service/http/config.go b/service/http/config.go
index 4b5950b3..caf94d98 100644
--- a/service/http/config.go
+++ b/service/http/config.go
@@ -18,6 +18,8 @@ type Config struct {
// SSL defines https server options.
SSL SSLConfig
+ HTTP2 *HTTP2Config
+
FCGI FCGIConfig
// MaxRequestSize specified max size for payload body in megabytes, set 0 to unlimited.
@@ -39,6 +41,10 @@ type FCGIConfig struct {
Address string
}
+type HTTP2Config struct {
+ MaxConcurrentStreams uint32
+}
+
// SSLConfig defines https server configuration.
type SSLConfig struct {
// Port to listen as HTTPS server, defaults to 443.
@@ -81,6 +87,12 @@ func (c *Config) Hydrate(cfg service.Config) error {
c.SSL.Port = 443
}
+ if c.HTTP2 == nil {
+ c.HTTP2 = &HTTP2Config{
+ MaxConcurrentStreams: 128,
+ }
+ }
+
c.Uploads.InitDefaults()
c.Workers.InitDefaults()