(domain, type)
| 4 | |
| 5 | // Query Google's public DNS JSON API for a given record type |
| 6 | const queryDns = async (domain, type) => { |
| 7 | const res = await httpGet('https://dns.google/resolve', { |
| 8 | params: { name: domain, type }, |
| 9 | headers: { Accept: 'application/dns-json' }, |
| 10 | timeout: 5000, |
| 11 | }); |
| 12 | return res.data; |
| 13 | }; |
| 14 | |
| 15 | const dnsSecHandler = async (url) => { |
| 16 | const { hostname } = parseTarget(url); |
no test coverage detected