Skip to content

Commit

Permalink
fix: Set IdleTimeout for http.Server (#1418)
Browse files Browse the repository at this point in the history
  • Loading branch information
mannbiher authored Apr 30, 2024
1 parent 9ab83c8 commit 9da6842
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions httpserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const (
certName = "tls.crt"
keyName = "tls.key"
readHeaderTimeout = 5 * time.Second
idleTimeout = 90 * time.Second
defaultMutationReferrerStoreName = "oras"

DefaultMetricsType = "prometheus"
Expand Down Expand Up @@ -135,6 +136,7 @@ func (server *Server) Run(certRotatorReady chan struct{}) error {
Addr: server.Address,
Handler: server.Router,
ReadHeaderTimeout: readHeaderTimeout,
IdleTimeout: idleTimeout,
}

if server.CertDirectory != "" {
Expand Down

0 comments on commit 9da6842

Please sign in to comment.