[#110] Add "h2" as next proto to allow HTTP/2 requests in http.Serve

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
pull/110/head
Alexey Vanin 2024-03-27 19:20:49 +03:00
parent 6695ebe5a0
commit f39b3aa93a
1 changed files with 1 additions and 0 deletions

View File

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