diff --git a/pkg/cri/streaming/server.go b/pkg/cri/streaming/server.go index 346dfb2c7..cc598562c 100644 --- a/pkg/cri/streaming/server.go +++ b/pkg/cri/streaming/server.go @@ -162,10 +162,11 @@ func NewServer(config Config, runtime Runtime) (Server, error) { handler.Add(ws) s.handler = handler s.server = &http.Server{ - Addr: s.config.Addr, - Handler: s.handler, - TLSConfig: s.config.TLSConfig, - ReadHeaderTimeout: 3 * time.Second, // Fix linter G112: Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server + Addr: s.config.Addr, + Handler: s.handler, + TLSConfig: s.config.TLSConfig, + // TODO(fuweid): allow user to configure streaming server + ReadHeaderTimeout: 30 * time.Minute, // Fix linter G112: Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server } return s, nil