fix: debug

This commit is contained in:
Derrick Hammer 2023-10-17 08:02:38 -04:00
parent 1daf045506
commit b35191bea2
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 0 deletions

View File

@ -59,6 +59,8 @@ addEventListener("fetch", (event: any) => {
// Use your existing communication framework to resolve DNS.
const dnsResult = await dnsClient.resolve(new URL(realUrl).hostname);
console.log("realUrl", realUrl);
if (!dnsResult.error && dnsResult.records.length > 0) {
return providerManager.fetch(dnsResult, new URL(realUrl).pathname);
}