feat(examples): HTTPS dev mode for mobile / XR testing#8753
Merged
Conversation
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).
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.
Adds optional HTTPS dev server for testing the examples browser on phones, tablets, and XR headsets over LAN. The default
npm run developflow is unchanged.Changes:
develop:httpsnpm script — HTTPS variant ofdevelop, reads certs fromexamples/.cert/. Fails fast with a clear hint if certs are missing.certnpm script — generates local dev certs via mkcert forlocalhost,127.0.0.1,::1, and the machine's.localhostname. Extra SANs accepted as positional args:npm run cert -- 10.0.0.42.examples/vite.config.mjs:allowedHostsreplaced 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:
https://<hostname>.local:5555.