Browse Source

cmd/stdiscosrv: Explicitly enable HTTP/2

The server supports it, but it's not negotiated unless explicitly
allowed in the TLS config NextProtos.
Jakob Borg 2 years ago
parent
commit
acc532fc60
1 changed files with 1 additions and 0 deletions
  1. 1 0
      cmd/stdiscosrv/apisrv.go

+ 1 - 0
cmd/stdiscosrv/apisrv.go

@@ -83,6 +83,7 @@ func (s *apiSrv) Serve(_ context.Context) error {
 			Certificates: []tls.Certificate{s.cert},
 			ClientAuth:   tls.RequestClientCert,
 			MinVersion:   tls.VersionTLS12,
+			NextProtos:   []string{"h2", "http/1.1"},
 		}
 
 		tlsListener, err := tls.Listen("tcp", s.addr, tlsCfg)