~ghost08/server

061ebad7af8c75e091662095f99d8701ee2c73a7 — Mgr. Vladimir Magyar 4 years ago e538842 v1.0.1
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
}