Skip to content

Commit 2307db7

Browse files
jhadvigopenshift-cherrypick-robot
authored andcommitted
OCPBUGS-21972: Disable HTTP/2 for webhook
1 parent 7ea10a2 commit 2307db7

File tree

1 file changed

+4
-2
lines changed
  • pkg/cmd/crdconversionwebhook

1 file changed

+4
-2
lines changed

pkg/cmd/crdconversionwebhook/cmd.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package crdconversionwebhook
22

33
import (
4+
"crypto/tls"
45
"fmt"
56
"net/http"
67

@@ -43,8 +44,9 @@ func startServer() {
4344
http.HandleFunc("/readyz", func(w http.ResponseWriter, req *http.Request) { w.Write([]byte("ok")) })
4445
clientset := getClient()
4546
server := &http.Server{
46-
Addr: fmt.Sprintf(":%d", port),
47-
TLSConfig: configTLS(config, clientset),
47+
Addr: fmt.Sprintf(":%d", port),
48+
TLSConfig: configTLS(config, clientset),
49+
TLSNextProto: make(map[string]func(*http.Server, *tls.Conn, http.Handler)), // disable HTTP/2
4850
}
4951
server.ListenAndServeTLS("", "")
5052
}

0 commit comments

Comments
 (0)