-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow fallbackDuration = 0 without disabling fallback #36
Comments
You can do https://github.com/szmarczak/cacheable-lookup#servers to make it use your DNS servers by default. cacheable-lookup/tests/test.js Lines 455 to 471 in c257b04
Fallback is meant to be used only when you're querying an endpoint defined in your |
Yep, I'm doing this, like
Is there a specific reason why it can't merge a DNS server with In my case, I'm looking up hosts for traffic from developers debugging their applications, so lots of traffic is localhost, I just want to resolve against my custom dns server before normal |
Wouldn't a better solution be to forward DNS queries to another server if you don't have them defined? For example https://coredns.io/plugins/forward/
What's the reason behind this?
I think a better way would be to create another property called |
My product is a developer tool - all the users are developers (or similar). It's a desktop app, so all of this is running in node on the developers' machines. The app itself is a local proxy for HTTP debugging. I'm trying to customize dns resolution as part of the routing for that, so that I can properly proxy traffic between docker containers, in addition to other developer debugging traffic.
This sounds useful in general, but I don't think it will help for my case. I specifically want to fallback to the OS's default DNS resolution, not another DNS server. I don't want to specify a different server because it might resolve things differently than the OS, and AFAIK no DNS resolution except
This could work: my DNS server is also running in node on the same machine, so it could just call I still don't understand why falling back to |
Thank you for the explanation. Finally I understand your thinking, and I agree! I will fix this tomorrow. |
Released |
Amazing, thanks for the quick turnaround! Just tested it, seems to work perfectly 👍 |
I want to allow fallback, but never cache any addresses as always using the fallback address.
In my case, that would be useful because I'm using a custom local DNS server that's doing some funky logic (resolving against the currently running set of docker containers) and the addresses that this server can resolve can change very frequently. I want to ensure every single lookup checks my custom DNS server doing running a normal resolution.
Is there a specific reason that this is currently not allowed? For now I'm using
1
, which is obviously pretty close and mostly works for my case, but it would be nice if I could disable that caching entirely whilst still using the fallback functionality.The text was updated successfully, but these errors were encountered: