mirror of
https://github.com/certd/certd.git
synced 2025-11-25 09:10:11 +08:00
perf: 优化证书申请速度和成功率,反代地址优化,google基本可以稳定请求。增加请求重试。
This commit is contained in:
@@ -37,8 +37,12 @@ export class CloudflareDnsProvider extends AbstractDnsProvider<CloudflareRecord>
|
||||
}
|
||||
|
||||
async getZoneId(domain: string) {
|
||||
this.logger.info('获取zoneId:', domain);
|
||||
const url = `https://api.cloudflare.com/client/v4/zones?name=${domain}`;
|
||||
const res = await this.doRequestApi(url, null, 'get');
|
||||
if (res.result.length === 0) {
|
||||
throw new Error(`未找到域名${domain}的zoneId`);
|
||||
}
|
||||
return res.result[0].id;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user