cmd/stdiscosrv: Explicitly enable HTTP/2

The server supports it, but it's not negotiated unless explicitly
allowed in the TLS config NextProtos.
This commit is contained in:
Jakob Borg 2023-08-30 09:09:50 +02:00
parent 3cc3fb7504
commit acc532fc60

View File

@ -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)