Skip to content

Commit 5d32bc7

Browse files
committed
server: do not configure acme if tls listener is not enabled
1 parent 9af96aa commit 5d32bc7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ func (s *Server) WithHTTP(o HTTPOptions) (err error) {
251251
ClientSessionCache: tls.NewLRUClientSessionCache(-1),
252252
}
253253
var acmeHTTPHandler func(fallback http.Handler) http.Handler
254-
if s.acmeCertsDir != "" {
254+
if s.acmeCertsDir != "" && o.ListenTLS != "" {
255255
certManager := autocert.Manager{
256256
Prompt: autocert.AcceptTOS,
257257
Cache: autocert.DirCache(s.acmeCertsDir),

0 commit comments

Comments
 (0)