Skip to content

Commit

Permalink
pkg/metrics: disable http2
Browse files Browse the repository at this point in the history
  • Loading branch information
flavianmissi committed Oct 18, 2023
1 parent f474164 commit 45919bb
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 45919bb

Please sign in to comment.