Fix ACME DNS01 DNS challenge

This commit is contained in:
世界 2023-09-23 17:49:56 +08:00
parent c60a944aac
commit d4d49d9df5
No known key found for this signature in database
GPG key ID: CD109927C34A63C4

View file

@ -90,7 +90,10 @@ func startACME(ctx context.Context, options option.InboundACMEOptions) (*tls.Con
solver.DNSProvider = &cloudflare.Provider{ solver.DNSProvider = &cloudflare.Provider{
APIToken: dnsOptions.CloudflareOptions.APIToken, APIToken: dnsOptions.CloudflareOptions.APIToken,
} }
default:
return nil, nil, E.New("unsupported ACME DNS01 provider type: " + dnsOptions.Provider)
} }
acmeConfig.DNS01Solver = &solver
} }
if options.ExternalAccount != nil && options.ExternalAccount.KeyID != "" { if options.ExternalAccount != nil && options.ExternalAccount.KeyID != "" {
acmeConfig.ExternalAccount = (*acme.EAB)(options.ExternalAccount) acmeConfig.ExternalAccount = (*acme.EAB)(options.ExternalAccount)