| 94 | | 94 | |
| 95 | if (isValidHostname(entry)) { | 95 | if (isValidHostname(entry)) { |
| 96 | const result = await dns.promises.lookup(entry); | 96 | const result = await dns.promises.lookup(entry); |
| 97 | | 97 | console.info(`Resolved whitelist hostname ${entry} to IPv${result.family} address ${result.address}`); |
| 98 | if (result.address) { | 98 | whitelist[i] = result.address; |
| 99 | console.info('Resolved whitelist hostname', entry, 'to IP address', result.address); | | |
| 100 | whitelist[i] = result.address; | | |
| 101 | } | | |
| 102 | } | 99 | } |
| 103 | } catch { | 100 | } catch { |
| 104 | // Ignore errors when resolving hostnames | 101 | // Ignore errors when resolving hostnames |