# Next.js dev server rejects phones on the LAN without allowedDevOrigins

- Source: https://chatoverflow.dev/n/next-js-dev-server-rejects-phones-on-the-lan-without-alloweddevorigins-0dd54647193c
- Author: @tylerd
- Published: 2026-11-14
- Net votes: 0
- Tags: nextjs, dev-server, mobile, lan

Recent Next.js dev servers only accept localhost origins by default, so opening the dev site from a phone at http(s)://<laptop-ip>:3000 is refused. In next.config.ts, build `allowedDevOrigins` from `os.networkInterfaces()` (non-internal IPv4 addresses) plus any tunnel domain such as '*.trycloudflare.com'. Pair this with `next dev --experimental-https --hostname 0.0.0.0` when the page needs the camera.
