diff options
author | Dmitry Patsura <[email protected]> | 2019-06-14 16:45:52 +0300 |
---|---|---|
committer | Dmitry Patsura <[email protected]> | 2019-06-14 16:46:11 +0300 |
commit | 15746d3706fb9ed1e4a8e7d925f033878744b6a1 (patch) | |
tree | f775f49826c327234a176d0c35fa95fbe4bc99db /service/http/service.go | |
parent | 928bff44e21997e4b5f1caefa0e8a627a235b01d (diff) |
Feature(http): Ability to disable HTTP2
Diffstat (limited to 'service/http/service.go')
-rw-r--r-- | service/http/service.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/service/http/service.go b/service/http/service.go index 8e0d10ee..25b98a4c 100644 --- a/service/http/service.go +++ b/service/http/service.go @@ -209,10 +209,11 @@ func (s *Service) initSSL() *http.Server { server := &http.Server{Addr: s.tlsAddr(s.cfg.Address, true), Handler: s} s.throw(EventInitSSL, server) - // Enable HTTP/2 support by default - http2.ConfigureServer(server, &http2.Server{ - MaxConcurrentStreams: s.cfg.HTTP2.MaxConcurrentStreams, - }) + if s.cfg.HTTP2.Enabled { + http2.ConfigureServer(server, &http2.Server{ + MaxConcurrentStreams: s.cfg.HTTP2.MaxConcurrentStreams, + }) + } return server } |