Skip to content

Add ReadHeaderTimeout values #5699

Closed
@codeboten

Description

@codeboten

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions