Skip to content

Commit

Permalink
Merge pull request #938 from flavianmissi/OCPBUGS-21853
Browse files Browse the repository at this point in the history
OCPBUGS-21853: disable http2 for metrics endpoint
  • Loading branch information
openshift-ci[bot] committed Oct 20, 2023
2 parents f474164 + 45919bb commit 586416c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/metrics/server.go
@@ -1,6 +1,7 @@
package metrics

import (
"crypto/tls"
"fmt"
"net/http"

Expand Down Expand Up @@ -32,8 +33,9 @@ func RunServer(port int) {
router := http.NewServeMux()
router.Handle("/metrics", handler)
srv := &http.Server{
Addr: bindAddr,
Handler: router,
Addr: bindAddr,
Handler: router,
TLSNextProto: map[string]func(*http.Server, *tls.Conn, http.Handler){}, // disable HTTP/2
}

if err := srv.ListenAndServeTLS(tlsCRT, tlsKey); err != nil {
Expand Down

0 comments on commit 586416c

Please sign in to comment.