vercel / dns-cached-resolve

Caching DNS resolver
Apache License 2.0
42 stars 9 forks source link

Fix resolve for localhost #35

Closed AndyBitz closed 3 years ago

AndyBitz commented 3 years ago

This short circuits the resolve for localhost and defaults to 127.0.0.1 and ::1. Right now it fails when it tries to resolve it because the resolve function will use a DNS Server to retrieve the result, but in the case of localhost, it'd actually need to lookup the /etc/hosts file.