opentelemetry-collector icon indicating copy to clipboard operation
opentelemetry-collector copied to clipboard

Add `ReadHeaderTimeout` values

Open codeboten opened this issue 3 years ago • 0 comments

The following lint errors started showing up after the latest upgrade to golangci-lint:

golangci-lint run
config/confighttp/confighttp.go:321:10: G112: Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server (gosec)
        return &http.Server{
                Handler: handler,
        }, nil
config/confighttp/compression_test.go:106:12: G112: Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server (gosec)
                        srv := &http.Server{
                                Handler: handler,
                        }
config/confighttp/compression_test.go:204:12: G112: Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server (gosec)
                        srv := &http.Server{
                                Handler: httpContentDecompressor(handler),
                        }
make: *** [lint] Error 1

codeboten avatar Jul 18 '22 18:07 codeboten