From 789464e134a95dfdee4d2e1db8376286feb70cc3 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Wed, 27 Mar 2024 19:07:06 +0300 Subject: [PATCH] [#341] Add "h2" as next proto to allow HTTP/2 requests in http.Serve Signed-off-by: Alex Vanin --- cmd/s3-gw/server.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/s3-gw/server.go b/cmd/s3-gw/server.go index f8a20d9f..694e9eea 100644 --- a/cmd/s3-gw/server.go +++ b/cmd/s3-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` }) }