From 5d32bc7523e874550a3936c04b5ac4c98b64680e Mon Sep 17 00:00:00 2001 From: Janos Guljas Date: Sat, 9 Nov 2019 22:08:15 +0100 Subject: [PATCH] server: do not configure acme if tls listener is not enabled --- server/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/server.go b/server/server.go index 56863a6..17502e5 100644 --- a/server/server.go +++ b/server/server.go @@ -251,7 +251,7 @@ func (s *Server) WithHTTP(o HTTPOptions) (err error) { ClientSessionCache: tls.NewLRUClientSessionCache(-1), } var acmeHTTPHandler func(fallback http.Handler) http.Handler - if s.acmeCertsDir != "" { + if s.acmeCertsDir != "" && o.ListenTLS != "" { certManager := autocert.Manager{ Prompt: autocert.AcceptTOS, Cache: autocert.DirCache(s.acmeCertsDir),