diff --git a/config/letsencrypt/letsencrypt.go b/config/letsencrypt/letsencrypt.go index 1a3bbab3d..876691ae2 100644 --- a/config/letsencrypt/letsencrypt.go +++ b/config/letsencrypt/letsencrypt.go @@ -189,7 +189,7 @@ func obtainCertificates(client *acme.Client, serverConfigs []*server.Config) ([] hosts = append(hosts, cfg.Host) } - certificates, err := client.ObtainCertificates(hosts) + certificates, err := client.ObtainCertificates(hosts, true) if err != nil { return nil, errors.New("error obtaining certs: " + err.Error()) } diff --git a/config/letsencrypt/renew.go b/config/letsencrypt/renew.go index 40f376cbf..dd80210dc 100644 --- a/config/letsencrypt/renew.go +++ b/config/letsencrypt/renew.go @@ -84,10 +84,11 @@ func processCertificateRenewal(configs []server.Config) []error { // Renew certificate. // TODO: revokeOld should be an option in the caddyfile - newCertMeta, err := client.RenewCertificate(certMeta, true) + // TODO: bundle should be an option in the caddyfile as well :) + newCertMeta, err := client.RenewCertificate(certMeta, true, true) if err != nil { time.Sleep(10 * time.Second) - newCertMeta, err = client.RenewCertificate(certMeta, true) + newCertMeta, err = client.RenewCertificate(certMeta, true, true) if err != nil { errs = append(errs, err) continue