Skip to content

feat(examples): HTTPS dev mode for mobile / XR testing#8753

Merged
mvaligursky merged 1 commit into
mainfrom
mv-local-https
May 20, 2026
Merged

feat(examples): HTTPS dev mode for mobile / XR testing#8753
mvaligursky merged 1 commit into
mainfrom
mv-local-https

Conversation

@mvaligursky
Copy link
Copy Markdown
Contributor

Adds optional HTTPS dev server for testing the examples browser on phones, tablets, and XR headsets over LAN. The default npm run develop flow is unchanged.

Changes:

  • New develop:https npm script — HTTPS variant of develop, reads certs from examples/.cert/. Fails fast with a clear hint if certs are missing.
  • New cert npm script — generates local dev certs via mkcert for localhost, 127.0.0.1, ::1, and the machine's .local hostname. Extra SANs accepted as positional args: npm run cert -- 10.0.0.42.
  • examples/vite.config.mjs: allowedHosts replaced with ['localhost', '.local'] for LAN device testing under Vite 6's host check. Removes .trycloudflare.com (fix(examples): allow trycloudflare.com in Vite allowedHosts #8750), since Cloudflare quick tunnels are blocked by corp security.
  • examples/.cert/ added to .gitignore — no cert material committed.
  • examples/README.md: new "HTTPS dev for mobile / XR device testing" section covering mkcert setup, per-device trust on iPhone / Apple Vision Pro / Android / Quest 3, dynamic LAN IPs, and troubleshooting.

Notes:

  • Verified end-to-end on Mac, Android, and Apple Vision Pro: HTTPS, WebGPU, and WebXR all working over https://<hostname>.local:5555.
  • Quest 3 path is documented but not verified (requires Meta Developer Mode registration, deferred).
  • Pairs with the engine-side secure-context warning landed in feat: warn when WebGPU or WebXR is used in an insecure context #8752.

Adds optional HTTPS dev server for testing the examples browser on
phones, tablets, and XR headsets over LAN. The default `npm run develop`
flow is unchanged.

- New `develop:https` script — HTTPS variant of `develop`, reads certs
  from `examples/.cert/`. Fails fast if certs are missing.
- New `cert` script — generates local dev certs via mkcert for
  localhost, 127.0.0.1, ::1, and the machine's .local hostname. Extra
  SANs accepted as positional args: `npm run cert -- 10.0.0.42`.
- Vite `allowedHosts` switched from `.trycloudflare.com` (corp-blocked,
  #8750) to `['localhost', '.local']` for LAN device testing under
  Vite 6's host check.
- `examples/.cert/` added to .gitignore.
- README gains an "HTTPS dev for mobile / XR device testing" section
  with mkcert setup, per-device trust steps, dynamic LAN IPs, and
  troubleshooting.

Verified on Mac, Android, and Apple Vision Pro. Quest 3 path is
documented but not verified (requires Meta Developer Mode).
@mvaligursky mvaligursky self-assigned this May 20, 2026
@mvaligursky mvaligursky requested a review from kpal81xd May 20, 2026 12:16
@mvaligursky mvaligursky merged commit 2741134 into main May 20, 2026
8 checks passed
@mvaligursky mvaligursky deleted the mv-local-https branch May 20, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant