From f39b3aa93a3e590f8e4fba415180e3e99f02843e Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Wed, 27 Mar 2024 19:20:49 +0300 Subject: [PATCH] [#110] Add "h2" as next proto to allow HTTP/2 requests in http.Serve Signed-off-by: Alex Vanin --- cmd/http-gw/server.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/http-gw/server.go b/cmd/http-gw/server.go index f8a20d9..694e9ee 100644 --- a/cmd/http-gw/server.go +++ b/cmd/http-gw/server.go @@ -74,6 +74,7 @@ func newServer(ctx context.Context, serverInfo ServerInfo) (*server, error) { ln = tls.NewListener(ln, &tls.Config{ GetCertificate: tlsProvider.GetCertificate, + NextProtos: []string{"h2"}, // required to enable HTTP/2 requests in `http.Serve` }) }