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

This commit is contained in:
xiaojunnuo
2025-09-10 14:12:36 +08:00
parent 1f759dce5b
commit d2ecfe5491

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) => {