1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2026-06-03 18:35:08 +02:00

[chore] Add gosec via golangci-lint (#4645)

This commit is contained in:
Robert Pająk
2023-10-19 08:47:07 +02:00
committed by GitHub
parent 78ea001442
commit 5b28921940
10 changed files with 40 additions and 35 deletions
@@ -242,7 +242,11 @@ func NewHTTPCollector(endpoint string, resultCh <-chan ExportResult) (*HTTPColle
mux := http.NewServeMux()
mux.Handle(u.Path, http.HandlerFunc(c.handler))
c.srv = &http.Server{Handler: mux}
c.srv = &http.Server{
Handler: mux,
ReadTimeout: 10 * time.Second,
WriteTimeout: 10 * time.Second,
}
if u.Scheme == "https" {
cert, err := weakCertificate()
if err != nil {