From 217419f6d97885daf0fb8832a407626e578523f0 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Sat, 7 Mar 2020 11:47:55 -0700 Subject: tls: Couple of quick fixes for 4d18587192e4fffe5b34b714eaabcfc212914c1e --- modules/caddyhttp/autohttps.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules/caddyhttp/autohttps.go') diff --git a/modules/caddyhttp/autohttps.go b/modules/caddyhttp/autohttps.go index 6b53d39..751c6df 100644 --- a/modules/caddyhttp/autohttps.go +++ b/modules/caddyhttp/autohttps.go @@ -318,6 +318,9 @@ func (app *App) createAutomationPolicy(ctx caddy.Context) error { // if it has an ACME issuer, maybe we can just use that acmeIssuer, _ = matchingPolicy.Issuer.(*caddytls.ACMEIssuer) } + if acmeIssuer == nil { + acmeIssuer = new(caddytls.ACMEIssuer) + } if acmeIssuer.Challenges == nil { acmeIssuer.Challenges = new(caddytls.ChallengesConfig) } -- cgit v1.2.3