Skip to content

Commit

Permalink
Add ReadHeaderTimeout to http.Server
Browse files Browse the repository at this point in the history
Signed-off-by: lhy1024 <admin@liudos.us>
  • Loading branch information
lhy1024 committed Feb 16, 2023
1 parent e12f074 commit 00eced3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/mcs/resource_manager/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,9 @@ func (s *Server) startServer() error {

handler, _ := SetUpRestHandler(s.service)
s.httpServer = &http.Server{
Handler: handler,
ReadTimeout: 5 * time.Minute,
Handler: handler,
ReadTimeout: 5 * time.Minute,
ReadHeaderTimeout: 5 * time.Second,
}

go func() {
Expand Down

0 comments on commit 00eced3

Please sign in to comment.