Skip to content

Commit

Permalink
Fix a bug where HTTP 2 connections were not working (#72)
Browse files Browse the repository at this point in the history
Signed-off-by: Chitoku <odango@chitoku.jp>
  • Loading branch information
chitoku-k authored Nov 25, 2021
1 parent 2740f34 commit b94b2d6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion web/tls_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,12 @@ func Serve(l net.Listener, server *http.Server, tlsConfigPath string, logger log
// Set the GetConfigForClient method of the HTTPS server so that the config
// and certs are reloaded on new connections.
server.TLSConfig.GetConfigForClient = func(*tls.ClientHelloInfo) (*tls.Config, error) {
return getTLSConfig(tlsConfigPath)
config, err := getTLSConfig(tlsConfigPath)
if err != nil {
return nil, err
}
config.NextProtos = server.TLSConfig.NextProtos
return config, nil
}
return server.ServeTLS(l, "", "")
}
Expand Down

0 comments on commit b94b2d6

Please sign in to comment.