Skip to content

Commit

Permalink
relax server timeouts
Browse files Browse the repository at this point in the history
these affect server-sent events, too and interfer with sign-in with ssb.
  • Loading branch information
cryptix committed Mar 24, 2021
1 parent db7baa1 commit 7c47462
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,10 @@ func runroomsrv() error {
Addr: httpLis.Addr().String(),

// Good practice to set timeouts to avoid Slowloris attacks.
WriteTimeout: time.Second * 15,
ReadTimeout: time.Second * 15,
IdleTimeout: time.Second * 60,
// Keep in mind that the SSE stuff for "sign-in with ssb" can take a moment, thou
ReadHeaderTimeout: time.Second * 15,
WriteTimeout: time.Minute * 3,
IdleTimeout: time.Minute * 3,

Handler: secureMiddleware.Handler(dashboardH),
}
Expand Down

0 comments on commit 7c47462

Please sign in to comment.