Skip to content

Commit

Permalink
fix: set read timeouts for api server
Browse files Browse the repository at this point in the history
Signed-off-by: nscuro <nscuro@protonmail.com>
  • Loading branch information
nscuro committed Jul 19, 2022
1 parent ed9f145 commit d7a3250
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ func NewServer(addr string, dtClient *dtrack.Client, auditor audit.Auditor, logg

return &Server{
httpServer: &http.Server{
Addr: addr,
Handler: router,
Addr: addr,
Handler: router,
ReadHeaderTimeout: 5 * time.Second,
ReadTimeout: 10 * time.Second,
},
router: router,
auditResultChan: auditChan,
Expand Down

0 comments on commit d7a3250

Please sign in to comment.