about summary refs log tree commit diff stats
path: root/internal/server/server.go
diff options
context:
space:
mode:
authorAlan Pearce2024-06-28 20:54:26 +0200
committerAlan Pearce2024-06-28 20:54:26 +0200
commitd7fbcb869165b0346c6c942ee04bfb61a8e8177c (patch)
tree534bc612e86cdc8646b3c44aedfbe268b255e875 /internal/server/server.go
parentcade05bffc5da4fa5b9ce1df93b4eb2abd246e73 (diff)
downloadwebsite-d7fbcb869165b0346c6c942ee04bfb61a8e8177c.tar.lz
website-d7fbcb869165b0346c6c942ee04bfb61a8e8177c.tar.zst
website-d7fbcb869165b0346c6c942ee04bfb61a8e8177c.zip
set server headers to be similar to certmagic's defaults
Diffstat (limited to 'internal/server/server.go')
-rw-r--r--internal/server/server.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/server/server.go b/internal/server/server.go
index 044b64f..f922f6d 100644
--- a/internal/server/server.go
+++ b/internal/server/server.go
@@ -218,8 +218,11 @@ func New(runtimeConfig *Config) (*Server, error) {
 
 	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{