aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/dnsserver/server_https.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/dnsserver/server_https.go b/core/dnsserver/server_https.go
index 07be746f9..ee76e78ed 100644
--- a/core/dnsserver/server_https.go
+++ b/core/dnsserver/server_https.go
@@ -40,7 +40,12 @@ func NewServerHTTPS(addr string, group []*Config) (*ServerHTTPS, error) {
tlsConfig = conf.TLSConfig
}
- sh := &ServerHTTPS{Server: s, tlsConfig: tlsConfig, httpsServer: new(http.Server)}
+ srv := &http.Server{
+ ReadTimeout: 5 * time.Second,
+ WriteTimeout: 10 * time.Second,
+ IdleTimeout: 120 * time.Second,
+ }
+ sh := &ServerHTTPS{Server: s, tlsConfig: tlsConfig, httpsServer: srv}
sh.httpsServer.Handler = sh
return sh, nil