szmarczak / cacheable-lookup

A cacheable dns.lookup(…) that respects TTL :tada:
MIT License
193 stars 29 forks source link

Respect the`hosts` file #8

Closed szmarczak closed 4 years ago

szmarczak commented 4 years ago

So it doesn't break on internal routes, e.g.

192.168.10.138 database
// Throws because the DNS server has no `database` entry,
// but it's defined in our `hosts` file.
https.request('https://database/get?key=foo', {lookup: cacheable.lookup});