Skip to content

Change default host to be IPv6-friendly#4357

Merged
devinivy merged 3 commits intov21from
ipv6-default-host
Jun 14, 2022
Merged

Change default host to be IPv6-friendly#4357
devinivy merged 3 commits intov21from
ipv6-default-host

Conversation

@devinivy
Copy link
Copy Markdown
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
Copy Markdown
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.

Copy link
Copy Markdown
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