diff --git a/packages/wrangler/src/pages.tsx b/packages/wrangler/src/pages.tsx index 55aecf50d97c..e6300fc6a5bc 100644 --- a/packages/wrangler/src/pages.tsx +++ b/packages/wrangler/src/pages.tsx @@ -897,7 +897,7 @@ export const pages: BuilderCallback = (yargs) => { if (proxyPort) { try { const url = new URL(request.url); - url.host = `127.0.0.1:${proxyPort}`; + url.host = `localhost:${proxyPort}`; return await fetch(url, request); } catch (thrown) { console.error(`Could not proxy request: ${thrown}`); @@ -935,10 +935,10 @@ export const pages: BuilderCallback = (yargs) => { try { // `startServer` might throw if user code contains errors const server = await miniflare.startServer(); - console.log(`Serving at http://127.0.0.1:${port}/`); + console.log(`Serving at http://localhost:${port}/`); if (process.env.BROWSER !== "none") { - const childProcess = await open(`http://127.0.0.1:${port}/`); + const childProcess = await open(`http://localhost:${port}/`); // fail silently if the open command doesn't work (e.g. in GitHub Codespaces) childProcess.on("error", (_err) => {}); }