mirror of
https://github.com/certd/certd.git
synced 2026-04-14 20:40:53 +08:00
fix: 修复某些情况下站点证书监控报undefined.includes的错误
This commit is contained in:
@@ -101,7 +101,7 @@ export class SiteInfoService extends BaseService<SiteInfoEntity> {
|
||||
throw new Error('没有发现证书');
|
||||
}
|
||||
const expires = certi.valid_to;
|
||||
const allDomains = certi.subjectaltname?.replaceAll('DNS:', '').split(',');
|
||||
const allDomains = certi.subjectaltname?.replaceAll('DNS:', '').split(',') ||[];
|
||||
const mainDomain = certi.subject?.CN;
|
||||
let domains = allDomains;
|
||||
if (!allDomains.includes(mainDomain)) {
|
||||
|
||||
Reference in New Issue
Block a user