From d5d7525a312b5f044ff779338160e5c9f8c92649 Mon Sep 17 00:00:00 2001 From: Jan Dittberner Date: Thu, 26 May 2022 16:53:52 +0200 Subject: [PATCH] Tighten http timeout settings --- README.md | 8 ++++---- cmd/boardvoting/config.go | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index e4b6ff8..befcdc1 100644 --- a/README.md +++ b/README.md @@ -99,10 +99,10 @@ You can use the following table to find useful values for the parameters in `con | `mail_config.notice_mail_address` | email address where notifications about votes are sent (production value is cacert-board@lists.cacert.org) | be creative but do not spam others (i.e. use user+board@your-domain.org) | | `mail_config.vote_notice_mail_address` | email address where notifications about individual votes are sent (production value is cacert-board-votes@lists.cacert.org) | be creative but do not spam others (i.e. use user+votes@your-domain.org) | | `mail_config.notification_sender_address` | sender address for all mails sent by the system (production value is returns@cacert.org) | be creative but do not spam others (i.e. use user+returns@your-domain.org) | -| `timeouts.idle` | idle timeout setting for HTTP and HTTPS (default: 5 seconds) | specify a nano second value | -| `timeouts.read` | read timeout setting for HTTP and HTTPS (default: 10 seconds) | | -| `timeouts.read_header` | header read timeout setting for HTTP and HTTPS (default: 10 seconds) | | -| `timeouts.write` | write timeout setting for HTTP and HTTPS (default: 60 seconds) | | +| `timeouts.idle` | idle timeout setting for HTTP and HTTPS (default: 1 minute) | specify a nano second value | +| `timeouts.read` | read timeout setting for HTTP and HTTPS (default: 5 seconds) | | +| `timeouts.read_header` | header read timeout setting for HTTP and HTTPS (default: 5 seconds) | | +| `timeouts.write` | write timeout setting for HTTP and HTTPS (default: 10 seconds) | | ### Generating random byte values diff --git a/cmd/boardvoting/config.go b/cmd/boardvoting/config.go index 29303fa..b1d8895 100644 --- a/cmd/boardvoting/config.go +++ b/cmd/boardvoting/config.go @@ -29,10 +29,10 @@ import ( const ( cookieSecretMinLen = 32 csrfKeyLength = 32 - httpIdleTimeout = 5 * time.Second - httpReadHeaderTimeout = 10 * time.Second - httpReadTimeout = 10 * time.Second - httpWriteTimeout = 60 * time.Second + httpIdleTimeout = time.Minute + httpReadHeaderTimeout = 5 * time.Second + httpReadTimeout = 5 * time.Second + httpWriteTimeout = 10 * time.Second ) type mailConfig struct {