Skip to content

Commit

Permalink
fix(api): enhance api server security (#377)
Browse files Browse the repository at this point in the history
enhance api server security

issue: none
  • Loading branch information
ezreal1997 authored Nov 26, 2024
1 parent 1da5c6f commit 32d45e0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ func NewServer(store Store, cl rpcclient.Client, listenAddress string, enableUns
s.httpServer = &http.Server{
Addr: listenAddress,
Handler: svrHandler,
ReadHeaderTimeout: 60 * time.Second,
ReadHeaderTimeout: 10 * time.Second,
ReadTimeout: 10 * time.Second,
WriteTimeout: 10 * time.Second,
IdleTimeout: 10 * time.Second,
MaxHeaderBytes: 8 << 10,
}

return s, nil
Expand Down

0 comments on commit 32d45e0

Please sign in to comment.