Closed mrbbot closed 1 year ago
Latest commit: dbfe5d929b6ea363e3231651d0ec877d9442ac9f
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Miniflare starts its loopback server on the same host as the
workerd
server, so it's accessible on all the same addresses as the runtime. This allows the loopback server to be the target for the live reload web socket. This means if thehost: "localhost"
option is set, we start a Nodehttp
server withlocalhost
as the hostname. Node will perform a DNS lookup to work out which IP address and interface to listen on, but will only listen on the first entry. In Node 17+, this will be the IPv6 interface. Unfortunately, we previously hardcoded the loopback address as the IPv4 loopback, meaningworkerd
was unable to connect. This change switches to usinglocalhost
, whichworkerd
will resolve to either IPv4 or v6.Closes cloudflare/workers-sdk#3515