mirror of
https://github.com/netbirdio/netbird.git
synced 2025-02-02 11:29:46 +01:00
Enable HTTP/2 when loading TLS config from file (#423)
When creating TLSConfig from provided certificate file, the HTTP/2 support is not enabled. It works with Certmanager because it adds h2 support. We enable it the same way when creating TLSConfig from files.
This commit is contained in:
parent
245863cd51
commit
6dc3e8ca90
@ -319,6 +319,9 @@ func loadTLSConfig(certFile string, certKey string) (*tls.Config, error) {
|
||||
config := &tls.Config{
|
||||
Certificates: []tls.Certificate{serverCert},
|
||||
ClientAuth: tls.NoClientCert,
|
||||
NextProtos: []string{
|
||||
"h2", "http/1.1", // enable HTTP/2
|
||||
},
|
||||
}
|
||||
|
||||
return config, nil
|
||||
|
Loading…
Reference in New Issue
Block a user