Skip to content

Commit 382ef8f

Browse files
authored
fix: open browser to correct url pressing b (#4474)
1 parent f728503 commit 382ef8f

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.changeset/heavy-dogs-serve.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"wrangler": patch
3+
---
4+
5+
fix: open browser to correct url pressing `b` in `--remote` mode
6+
7+
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`.

packages/wrangler/src/dev/dev.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ function useHotkeys(props: {
534534
break;
535535
// open browser
536536
case "b": {
537-
if (ip === "0.0.0.0") {
537+
if (ip === "0.0.0.0" || ip === "*") {
538538
await openInBrowser(`${localProtocol}://127.0.0.1:${port}`);
539539
return;
540540
}

0 commit comments

Comments
 (0)