caddytls: Only make DNS solver if not already set (fix #6880)

This commit is contained in:
Matthew Holt 2025-03-07 09:46:43 -07:00
parent 19876208c7
commit adbe7f87e6
No known key found for this signature in database
GPG Key ID: 2A349DD577D586A5

View File

@ -146,8 +146,8 @@ func (iss *ACMEIssuer) Provision(ctx caddy.Context) error {
iss.AccountKey = accountKey iss.AccountKey = accountKey
} }
// DNS challenge provider // DNS challenge provider, if not already established
if iss.Challenges != nil && iss.Challenges.DNS != nil { if iss.Challenges != nil && iss.Challenges.DNS != nil && iss.Challenges.DNS.solver == nil {
var prov certmagic.DNSProvider var prov certmagic.DNSProvider
if iss.Challenges.DNS.ProviderRaw != nil { if iss.Challenges.DNS.ProviderRaw != nil {
// a challenge provider has been locally configured - use it // a challenge provider has been locally configured - use it