Skip to content

Commit

Permalink
server: do not configure acme if tls listener is not enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
janos committed Nov 9, 2019
1 parent 9af96aa commit 5d32bc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 5d32bc7

Please sign in to comment.