You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 13, 2025. It is now read-only.
Use localhost instead of 127.0.0.1 for loopback hostname (#615)
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 the `host: "localhost"` option
is set, we start a Node `http` server with `localhost` 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,
meaning `workerd` was unable to connect. This change switches to
using `localhost`, which `workerd` will resolve to either IPv4 or v6.
Closescloudflare/workers-sdk#3515
0 commit comments