fix: 修复部署到又拍云强制https无效的bug

pull/409/head
xiaojunnuo 2025-05-11 12:29:04 +08:00
parent c88f959ec9
commit 2397097e4d
1 changed files with 6 additions and 4 deletions

View File

@ -113,24 +113,26 @@ export class UpyunDeployToCdn extends AbstractTaskPlugin {
for (const item of this.cdnList) { for (const item of this.cdnList) {
const data :any= { const data :any= {
crt_id: certId, certificate_id: certId,
domain_name: item, domain: item,
} }
if (this.forceHttps !== 'keep') { if (this.forceHttps !== 'keep') {
data.force_https = Boolean(this.forceHttps); data.force_https = Boolean(this.forceHttps);
} }
if (this.https !=='keep') { if (this.https !=='keep') {
data.https = Boolean(this.https); data.https = Boolean(this.https);
} }
this.logger.info(`开始部署证书:${item}`); this.logger.info(`开始部署证书:${item}`);
const res = await upyunClient.doRequest({ const res = await upyunClient.doRequest({
cookie: cookie, cookie: cookie,
url: "https://console.upyun.com/api/https/migrate/domain", url: "https://console.upyun.com/api/https/certificate/manager",
method: "POST", method: "POST",
data: data data: data
}); });
this.logger.info(`部署成功:${JSON.stringify(res)}`); this.logger.info(`部署成功:${JSON.stringify(res)}`);
} }
this.logger.info("部署成功"); this.logger.info("部署成功");