Skip to content

Commit b94b2d6

Browse files
authored
Fix a bug where HTTP 2 connections were not working (#72)
Signed-off-by: Chitoku <[email protected]>
1 parent 2740f34 commit b94b2d6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

web/tls_config.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,12 @@ func Serve(l net.Listener, server *http.Server, tlsConfigPath string, logger log
240240
// Set the GetConfigForClient method of the HTTPS server so that the config
241241
// and certs are reloaded on new connections.
242242
server.TLSConfig.GetConfigForClient = func(*tls.ClientHelloInfo) (*tls.Config, error) {
243-
return getTLSConfig(tlsConfigPath)
243+
config, err := getTLSConfig(tlsConfigPath)
244+
if err != nil {
245+
return nil, err
246+
}
247+
config.NextProtos = server.TLSConfig.NextProtos
248+
return config, nil
244249
}
245250
return server.ServeTLS(l, "", "")
246251
}

0 commit comments

Comments
 (0)