Add option allow external connections to npx gulp server#20646
Open
nicolo-ribaudo wants to merge 1 commit intomozilla:masterfrom
Open
Add option allow external connections to npx gulp server#20646nicolo-ribaudo wants to merge 1 commit intomozilla:masterfrom
npx gulp server#20646nicolo-ribaudo wants to merge 1 commit intomozilla:masterfrom
Conversation
2 tasks
calixteman
reviewed
Feb 10, 2026
Contributor
calixteman
left a comment
There was a problem hiding this comment.
You can add an option to handle whatever host:
https://github.com/mozilla/pdf.js/blob/master/gulpfile.mjs#L2096-L2144
timvandermeij
approved these changes
Feb 12, 2026
99c8bb6 to
5d167f5
Compare
Using `0.0.0.0` instead of `localhost` allows connecting from other devices, significantly simplifying testing on mobile devices. This is controlled by the `--any-host` CLI flag and not enabled by default, since allowing external connections comes with security implications (e.g. when on a public network without a properly configured firewall).
5d167f5 to
d19e935
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #20646 +/- ##
=========================================
Coverage ? 59.83%
=========================================
Files ? 169
Lines ? 90165
Branches ? 0
=========================================
Hits ? 53952
Misses ? 36213
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
npx gulp servernpx gulp server
Contributor
Author
|
@calixteman Is this what you meant? |
Contributor
I was imagining something like |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Using
0.0.0.0instead oflocalhostallows connecting from otherdevices, significantly simplifying testing on mobile devices.
This is controlled by the
--any-hostCLI flag and not enabled bydefault, since allowing external connections comes with security
implications (e.g. when on a public network without a properly
configured firewall).