fix: 修复证书监控某些情况下报 options.lookup不能为null的bug

v2-dev
xiaojunnuo 2025-09-10 14:12:36 +08:00
parent 1f759dce5b
commit d2ecfe5491
1 changed files with 5 additions and 1 deletions

View File

@ -80,7 +80,11 @@ export class SiteTester {
}
}
options.agent = new https.Agent({ keepAlive: false, lookup: customLookup });
const agentOptions:any = { keepAlive: false };
if (customLookup) {
agentOptions.lookup = customLookup
}
options.agent = new https.Agent(agentOptions);
// 创建 HTTPS 请求
const requestPromise = safePromise((resolve, reject) => {