forked from cloudflare/workers-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[wrangler] fix: listen on loopback for wrangler dev port check and login
The `wrangler dev` port availability check triggers a firewall prompt on macOS while it briefly opens and closes listeners. The OAuth callback server from `wrangler login` has the same issue. Fix both cases by listening on the loopback address only by default. Fixed some new test failures by using locally available IP addresses: wrangler:test: ● wrangler dev › ip › should use to `ip` from `wrangler.toml`, if available wrangler:test: listen EADDRNOTAVAIL: address not available 1.2.3.4:8787 wrangler:test: wrangler:test: ● wrangler dev › ip › should use --ip command line arg, if provided wrangler:test: listen EADDRNOTAVAIL: address not available 5.6.7.8:8787 Relates to cloudflare#4430
- Loading branch information
1 parent
300d427
commit 4e711c9
Showing
5 changed files
with
36 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
"wrangler": patch | ||
--- | ||
|
||
fix: listen on loopback for wrangler dev port check and login | ||
|
||
Avoid listening on the wildcard address by default to reduce the attacker's | ||
surface and avoid firewall prompts on macOS. | ||
|
||
Relates to #4430. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters