Merge pull request #30 from hobbyistlabs-coder/sentinel-http-idle-timeouts-285329166318422826

🛡️ Sentinel: [MEDIUM] Add IdleTimeout to HTTP servers
This commit is contained in:
hobbyistlabs-coder 2026-03-15 01:30:08 -04:00 committed by GitHub
commit adfc362eb9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 0 deletions

View file

@ -123,6 +123,7 @@ func LoginBrowser(cfg OAuthProviderConfig) (*AuthCredential, error) {
ReadTimeout: 10 * time.Second, ReadTimeout: 10 * time.Second,
ReadHeaderTimeout: 5 * time.Second, ReadHeaderTimeout: 5 * time.Second,
WriteTimeout: 10 * time.Second, WriteTimeout: 10 * time.Second,
IdleTimeout: 120 * time.Second,
} }
go server.Serve(listener) go server.Serve(listener)
defer func() { defer func() {

View file

@ -333,6 +333,7 @@ func (m *Manager) SetupHTTPServer(addr string, healthServer *health.Server) {
ReadTimeout: 30 * time.Second, ReadTimeout: 30 * time.Second,
ReadHeaderTimeout: 10 * time.Second, ReadHeaderTimeout: 10 * time.Second,
WriteTimeout: 30 * time.Second, WriteTimeout: 30 * time.Second,
IdleTimeout: 120 * time.Second,
} }
} }

View file

@ -49,6 +49,7 @@ func NewServer(host string, port int) *Server {
ReadTimeout: 5 * time.Second, ReadTimeout: 5 * time.Second,
ReadHeaderTimeout: 3 * time.Second, ReadHeaderTimeout: 3 * time.Second,
WriteTimeout: 5 * time.Second, WriteTimeout: 5 * time.Second,
IdleTimeout: 120 * time.Second,
} }
return s return s