all repos — website @ d7fbcb869165b0346c6c942ee04bfb61a8e8177c

My website

set server headers to be similar to certmagic's defaults
Alan Pearce alan@alanpearce.eu
Fri, 28 Jun 2024 20:54:26 +0200
commit

d7fbcb869165b0346c6c942ee04bfb61a8e8177c

parent

cade05bffc5da4fa5b9ce1df93b4eb2abd246e73

1 files changed, 4 insertions(+), 1 deletions(-)

jump to
M internal/server/server.gointernal/server/server.go
@@ -218,8 +218,11 @@ }) 
 	return &Server{
 		Server: &http.Server{
+			ReadHeaderTimeout: 10 * time.Second,
+			ReadTimeout:       1 * time.Minute,
+			WriteTimeout:      2 * time.Minute,
+			IdleTimeout:       10 * time.Minute,
 			Addr:              listenAddress,
-			ReadHeaderTimeout: 1 * time.Minute,
 			Handler: http.MaxBytesHandler(h2c.NewHandler(
 				top,
 				&http2.Server{