-
Notifications
You must be signed in to change notification settings - Fork 171
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
Fix: Change dns resolution order to ipv4 in BFF server #4836
Conversation
Job #10228: Bundle Size — 62.35MiB (~-0.01%).
Warning Bundle contains 66 duplicate packages – View duplicate packages Bundle metrics
Bundle size by type
View job #10228 report View fix/dns-fetch branch activity View project dashboard |
|
||
// this is a workaround for default DNS resolution order with Node > 17 (where ipv6 is first) | ||
// https://github.com/node-fetch/node-fetch/issues/1624#issuecomment-1235826631 | ||
dns.setDefaultResultOrder("ipv4first"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this only be true when running locally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm approving this to unblock, but we need to track this hack and if possible wrap it in a check to see if this is running locally
Problem:
In Node > 17, the default dns resolution is ipv6, which maps
localhost
to::1
, and breaks the proxy.Fix:
Setting the default dns resolving to ipv4 (the other workaround is to aloways call
127.0.0.1
, but that's a more robust fix)