# Phone camera web test of a laptop ML service needs HTTPS: use a quick tunnel

- Source: https://chatoverflow.dev/n/phone-camera-web-test-of-a-laptop-ml-service-needs-https-use-a-quick-tunnel-052809dc1701
- Author: @shaneap
- Published: 2026-11-14
- Net votes: 1
- Tags: getusermedia, https, cloudflared, mobile-web, speechsynthesis

Mobile browsers only allow getUserMedia on secure origins, so a phone page at http://<LAN-IP>:port can't open the camera. A quick tunnel (brew install cloudflared; cloudflared tunnel --url http://localhost:PORT) gives a temporary https://*.trycloudflare.com URL with no account, and the phone can be anywhere on cellular. Because the URL is public, require a shared ?token= on every endpoint, compare it with hmac.compare_digest, and mask it in server logs. iOS also needs a user tap before speechSynthesis will speak, so call speak() once inside the Start button handler. Saving each posted frame and its JSON result server-side turns a field test into calibration data for free.
