Skip to content

Commit

Permalink
fix: open browser to correct url pressing b (#4474)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbbot authored Nov 22, 2023
1 parent f728503 commit 382ef8f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .changeset/heavy-dogs-serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"wrangler": patch
---

fix: open browser to correct url pressing `b` in `--remote` mode

This change ensures Wrangler doesn't try to open `http://*` when `*` is used as the dev server's hostname. Instead, Wrangler will now open `http://127.0.0.1`.
2 changes: 1 addition & 1 deletion packages/wrangler/src/dev/dev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ function useHotkeys(props: {
break;
// open browser
case "b": {
if (ip === "0.0.0.0") {
if (ip === "0.0.0.0" || ip === "*") {
await openInBrowser(`${localProtocol}://127.0.0.1:${port}`);
return;
}
Expand Down

0 comments on commit 382ef8f

Please sign in to comment.