mirror of
https://github.com/certd/certd.git
synced 2026-05-16 05:07:32 +08:00
perf: 阿里云CDN部署支持根据证书域名自动匹配部署
This commit is contained in:
@@ -236,4 +236,19 @@ export class AliyunSslClient {
|
||||
}
|
||||
return region;
|
||||
}
|
||||
|
||||
getCertDomains(cert: CertInfo | number | CasCertId): string[]{
|
||||
const casCert = cert as CasCertId;
|
||||
const certInfo = cert as CertInfo;
|
||||
if (casCert.certId) {
|
||||
if (!casCert.detail){
|
||||
throw new Error('未获取到证书域名列表,请尝试强制重新运行一下流水线');
|
||||
}
|
||||
return casCert.detail?.domains || [];
|
||||
}else if (certInfo.crt){
|
||||
return new CertReader(certInfo).getSimpleDetail().domains || [];
|
||||
}else{
|
||||
throw new Error('未获取到证书域名列表,请尝试强制重新运行一下流水线');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user