import dnslookup from '../../internalfunctions/dnslookup.js';
export async function onRequest(context) {
  // Contents of context object
  const {
    request // same as existing Worker API
  } = context;
    return new Response(await dnslookup(new URL(request.url).searchParams.get('domain')),{
        headers:{
            'Access-Control-Allow-Origin':'*',
            'Content-Type':'application/json'
        }
    })
}