add readheader timeout
1 files changed, 7 insertions(+), 6 deletions(-) M server.go
M server.go => server.go +7 -6
@@ 30,12 30,13 @@ func New(handler http.Handler, serverAddress string) *http.Server { }, } srv := &http.Server{ Addr: serverAddress, ReadTimeout: 5 * time.Second, WriteTimeout: 10 * time.Second, IdleTimeout: 120 * time.Second, TLSConfig: tlsConfig, Handler: handler, Addr: serverAddress, ReadTimeout: 60 * time.Second, ReadHeaderTimeout: 5 * time.Second, WriteTimeout: 10 * time.Second, IdleTimeout: 120 * time.Second, TLSConfig: tlsConfig, Handler: handler, } return srv }