Skip to content
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

Change default host to be IPv6-friendly #4357

Merged
merged 3 commits into from
Jun 14, 2022
Merged

Change default host to be IPv6-friendly #4357

merged 3 commits into from
Jun 14, 2022

Conversation

devinivy
Copy link
Member

@devinivy devinivy commented Jun 13, 2022

This changes hapi's default host of 0.0.0.0 to use node's IPv6-friendly default host of :: or 0.0.0.0, depending on whether the machine supports IPv6.

Under node v18 the drawbacks of the current default are emphasized, since DNS resolution in node has changed (nodejs/node#39987) allowing localhost to resolve to the IPv6 address ::1— since 0.0.0.0 was pinned to IPv4, a request to localhost from node would not be able to connect to a default hapi server.

@devinivy devinivy added feature New functionality or improvement breaking changes Change that can breaking existing code labels Jun 13, 2022
@devinivy devinivy added this to the 21.0.0 milestone Jun 13, 2022
Copy link
Member

@Nargonath Nargonath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the work Devin.

test/request.js Outdated Show resolved Hide resolved
lib/core.js Show resolved Hide resolved
Copy link
Contributor

@kanongil kanongil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking changes Change that can breaking existing code feature New functionality or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants