chore(lint): upgrade golangci-lint to v1.47.2
- Fix Slowloris attacks on HTTP servers - Force set default of 5 minutes for pprof read timeout - Change `ShutdownTimeout` to time.Duration since it cannot be set to 0
This commit is contained in:
@@ -2,6 +2,7 @@ package pprof
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"time"
|
||||
|
||||
"github.com/qdm12/gluetun/internal/configuration/settings/helpers"
|
||||
"github.com/qdm12/gluetun/internal/httpserver"
|
||||
@@ -27,6 +28,8 @@ type Settings struct {
|
||||
func (s *Settings) SetDefaults() {
|
||||
s.Enabled = helpers.DefaultBool(s.Enabled, false)
|
||||
s.HTTPServer.Address = helpers.DefaultString(s.HTTPServer.Address, "localhost:6060")
|
||||
const defaultReadTimeout = 5 * time.Minute // for CPU profiling
|
||||
s.HTTPServer.ReadTimeout = helpers.DefaultDuration(s.HTTPServer.ReadTimeout, defaultReadTimeout)
|
||||
s.HTTPServer.SetDefaults()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user