Skip to content

Commit

Permalink
go fmt
Browse files Browse the repository at this point in the history
Signed-off-by: Siddhesh Ghadi <[email protected]>
  • Loading branch information
svghadi committed Oct 27, 2023
1 parent 6ffb1cc commit eaf59ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ func makeHTTPCmd() *cobra.Command {
log.Printf("listening on %s", listen)

server := &http.Server{
Addr: listen,
Addr: listen,
}
// Disable HTTP/2 to mitigate CVE-2023-39325 & CVE-2023-44487
if !viper.GetBool(enableHTTP2) {
log.Printf("Disabled HTTP/2 protocol")
server.TLSNextProto = map[string]func(*http.Server, *tls.Conn, http.Handler){}
}
}

if viper.GetBool(noTLSFlag) {
log.Println("TLS connections disabled")
Expand Down Expand Up @@ -122,7 +122,7 @@ func makeHTTPCmd() *cobra.Command {
cmd.Flags().Bool(
enableHTTP2,
false,
"enable HTTP/2 for the server. Disable by default",
"enable HTTP/2 for the server",
)
logIfError(viper.BindPFlag(enableHTTP2, cmd.Flags().Lookup(enableHTTP2)))
return cmd
Expand Down

0 comments on commit eaf59ca

Please sign in to comment.