Skip to content

Add option allow external connections to npx gulp server#20646

Open
nicolo-ribaudo wants to merge 1 commit intomozilla:masterfrom
nicolo-ribaudo:allow-any-host
Open

Add option allow external connections to npx gulp server#20646
nicolo-ribaudo wants to merge 1 commit intomozilla:masterfrom
nicolo-ribaudo:allow-any-host

Conversation

@nicolo-ribaudo
Copy link
Contributor

@nicolo-ribaudo nicolo-ribaudo commented Feb 10, 2026

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).

Copy link
Contributor

@calixteman calixteman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can add an option to handle whatever host:
https://github.com/mozilla/pdf.js/blob/master/gulpfile.mjs#L2096-L2144

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).
@codecov-commenter
Copy link

codecov-commenter commented Feb 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (master@3eca607). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff            @@
##             master   #20646   +/-   ##
=========================================
  Coverage          ?   59.83%           
=========================================
  Files             ?      169           
  Lines             ?    90165           
  Branches          ?        0           
=========================================
  Hits              ?    53952           
  Misses            ?    36213           
  Partials          ?        0           
Flag Coverage Δ
unittestcli 59.83% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nicolo-ribaudo nicolo-ribaudo changed the title Add env var to allow external connections to npx gulp server Add option allow external connections to npx gulp server Feb 17, 2026
@nicolo-ribaudo
Copy link
Contributor Author

@calixteman Is this what you meant?

@calixteman
Copy link
Contributor

@calixteman Is this what you meant?

I was imagining something like --host 0.0.0.0 and --host 0 could be a shortcut for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments