MCPcopy
hub / github.com/lissy93/web-check / queryDns

Function queryDns

api/dnssec.js:6–13  ·  view source on GitHub ↗
(domain, type)

Source from the content-addressed store, hash-verified

4
5// Query Google's public DNS JSON API for a given record type
6const 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
15const dnsSecHandler = async (url) => {
16 const { hostname } = parseTarget(url);

Callers 1

dnsSecHandlerFunction · 0.85

Calls 1

httpGetFunction · 0.90

Tested by

no test coverage detected