mirror of
https://github.com/certd/certd.git
synced 2026-07-26 13:57:46 +08:00
fix(aliyun): 修复阿里云CDN/DCDN根据证书自动匹配不到证书的bug
This commit is contained in:
@@ -6,7 +6,7 @@ name: AliyunDeployCertToESA
|
|||||||
title: 阿里云-部署至ESA
|
title: 阿里云-部署至ESA
|
||||||
icon: svg:icon-aliyun
|
icon: svg:icon-aliyun
|
||||||
group: aliyun
|
group: aliyun
|
||||||
desc: 部署证书到阿里云ESA(边缘安全加速),自动删除过期证书
|
desc: 部署证书到阿里云ESA(边缘安全加速),支持边缘证书和SaaS证书两种模式
|
||||||
needPlus: false
|
needPlus: false
|
||||||
input:
|
input:
|
||||||
cert:
|
cert:
|
||||||
@@ -32,7 +32,6 @@ input:
|
|||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template: false
|
template: false
|
||||||
required: false
|
required: false
|
||||||
order: 0
|
order: 0
|
||||||
@@ -70,6 +69,20 @@ input:
|
|||||||
type: aliyun
|
type: aliyun
|
||||||
required: true
|
required: true
|
||||||
order: 0
|
order: 0
|
||||||
|
deployMode:
|
||||||
|
title: 部署模式
|
||||||
|
value: edge
|
||||||
|
component:
|
||||||
|
name: a-radio-group
|
||||||
|
vModel: value
|
||||||
|
options:
|
||||||
|
- label: 边缘证书
|
||||||
|
value: edge
|
||||||
|
- label: SaaS证书
|
||||||
|
value: saas
|
||||||
|
helper: 边缘证书:将证书部署到站点的边缘节点;SaaS证书:将证书部署到站点的SaaS域名
|
||||||
|
required: true
|
||||||
|
order: 0
|
||||||
siteIds:
|
siteIds:
|
||||||
title: 站点
|
title: 站点
|
||||||
component:
|
component:
|
||||||
@@ -96,9 +109,40 @@ input:
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
helper: 请选择要部署证书的站点
|
helper: 请选择要部署证书的站点
|
||||||
order: 0
|
order: 0
|
||||||
|
saasDomainIds:
|
||||||
|
title: SaaS域名
|
||||||
|
helper: 请选择要部署证书的SaaS域名(SaaS证书模式下必选)
|
||||||
|
component:
|
||||||
|
name: remote-select
|
||||||
|
vModel: value
|
||||||
|
mode: tags
|
||||||
|
type: plugin
|
||||||
|
action: onGetCustomHostnameList
|
||||||
|
search: false
|
||||||
|
pager: false
|
||||||
|
single: false
|
||||||
|
watches:
|
||||||
|
- certDomains
|
||||||
|
- accessId
|
||||||
|
- siteIds
|
||||||
|
- accessId
|
||||||
|
- regionId
|
||||||
|
required: false
|
||||||
|
mergeScript: |2-
|
||||||
|
|
||||||
|
return {
|
||||||
|
show: ctx.compute(({form})=>{
|
||||||
|
return form.deployMode === 'saas'
|
||||||
|
}),
|
||||||
|
component:{
|
||||||
|
form: ctx.compute(({form})=>{
|
||||||
|
return form
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
order: 0
|
||||||
certLimit:
|
certLimit:
|
||||||
title: 免费证书数量限制
|
title: 免费证书数量限制
|
||||||
value: 2
|
value: 2
|
||||||
|
|||||||
@@ -254,13 +254,16 @@ export class DeployCertToAliyunCDN extends AbstractTaskPlugin {
|
|||||||
const client = await this.getClient(access);
|
const client = await this.getClient(access);
|
||||||
|
|
||||||
const pager = new Pager(data);
|
const pager = new Pager(data);
|
||||||
const params = {
|
const params: any = {
|
||||||
DomainName: data.searchKey,
|
|
||||||
PageSize: pager.pageSize || 100,
|
PageSize: pager.pageSize || 100,
|
||||||
PageNumber: pager.pageNo || 1,
|
PageNumber: pager.pageNo || 1,
|
||||||
DomainSearchType: "fuzzy_match",
|
DomainSearchType: "fuzzy_match",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (data.searchKey) {
|
||||||
|
params.DomainName = data.searchKey;
|
||||||
|
}
|
||||||
|
|
||||||
const requestOption = {
|
const requestOption = {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
formatParams: false,
|
formatParams: false,
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ export class DeployCertToAliyunDCDN extends AbstractTaskPlugin {
|
|||||||
|
|
||||||
if (this.domainMatchMode === "auto") {
|
if (this.domainMatchMode === "auto") {
|
||||||
const { result, deployedList } = await this.autoMatchedDeploy({
|
const { result, deployedList } = await this.autoMatchedDeploy({
|
||||||
targetName: "CDN加速域名",
|
targetName: "DCDN加速域名",
|
||||||
uploadCert: async () => {
|
uploadCert: async () => {
|
||||||
return await sslClient.uploadCertOrGet(this.cert);
|
return await sslClient.uploadCertOrGet(this.cert);
|
||||||
},
|
},
|
||||||
@@ -190,13 +190,15 @@ export class DeployCertToAliyunDCDN extends AbstractTaskPlugin {
|
|||||||
|
|
||||||
const client = await this.getClient(access);
|
const client = await this.getClient(access);
|
||||||
const pager = new Pager(data);
|
const pager = new Pager(data);
|
||||||
const params = {
|
const params: any = {
|
||||||
DomainName: data.searchKey,
|
|
||||||
PageSize: pager.pageSize || 200,
|
PageSize: pager.pageSize || 200,
|
||||||
PageNumber: pager.pageNo || 1,
|
PageNumber: pager.pageNo || 1,
|
||||||
DomainSearchType: "fuzzy_match",
|
DomainSearchType: "fuzzy_match",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (data.searchKey) {
|
||||||
|
params.DomainName = data.searchKey;
|
||||||
|
}
|
||||||
const requestOption = {
|
const requestOption = {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
formatParams: false,
|
formatParams: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user