Fix wrong record name for dnsme

This commit is contained in:
Fang-Pen Lin
2025-11-21 11:40:31 -08:00
parent acca6f2323
commit 8c59579e1e
2 changed files with 7 additions and 1 deletions

View File

@@ -243,7 +243,11 @@ export const orderCertificate = async (
throw new Error("Unsupported challenge type");
}
const recordName = `_acme-challenge.${authz.identifier.value}`; // e.g., "_acme-challenge.example.com"
let recordName = `_acme-challenge.${authz.identifier.value}`; // e.g., "_acme-challenge.example.com"
if (acmeCa.configuration.dnsProviderConfig.provider === AcmeDnsProvider.DNSMadeEasy) {
// For DNS Made Easy, we don't need to provide the domain name in the record name.
recordName = "_acme-challenge";
}
const recordValue = `"${keyAuthorization}"`; // must be double quoted
switch (acmeCa.configuration.dnsProviderConfig.provider) {

View File

@@ -18,6 +18,7 @@ export const dnsMadeEasyInsertTxtRecord = async (
credentials: { apiKey, secretKey }
} = connection;
logger.info({ hostedZoneId, domain, value }, "Inserting TXT record for DNS Made Easy");
try {
await request.post(
getDNSMadeEasyUrl(`/V2.0/dns/managed/${encodeURIComponent(hostedZoneId)}/records`),
@@ -64,6 +65,7 @@ export const dnsMadeEasyDeleteTxtRecord = async (
credentials: { apiKey, secretKey }
} = connection;
logger.info({ hostedZoneId, domain, value }, "Deleting TXT record for DNS Made Easy");
try {
// First, list records to find the record ID
const listRecordsResponse = await request.get<{