Skip to content

Commit 872037b

Browse files
authored
feat: allow http2 in coder server (#6871)
1 parent 175dde1 commit 872037b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cli/server.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1390,6 +1390,7 @@ func generateSelfSignedCertificate() (*tls.Certificate, error) {
13901390
func configureTLS(tlsMinVersion, tlsClientAuth string, tlsCertFiles, tlsKeyFiles []string, tlsClientCAFile string) (*tls.Config, error) {
13911391
tlsConfig := &tls.Config{
13921392
MinVersion: tls.VersionTLS12,
1393+
NextProtos: []string{"h2", "http/1.1"},
13931394
}
13941395
switch tlsMinVersion {
13951396
case "tls10":
@@ -1679,6 +1680,7 @@ func configureHTTPClient(ctx context.Context, clientCertFile, clientKeyFile stri
16791680

16801681
tlsClientConfig := &tls.Config{ //nolint:gosec
16811682
Certificates: certificates,
1683+
NextProtos: []string{"h2", "http/1.1"},
16821684
}
16831685
err = configureCAPool(tlsClientCAFile, tlsClientConfig)
16841686
if err != nil {

0 commit comments

Comments
 (0)