Skip to content

Allow *.trycloudflare.com as a dev origin#4

Open
cosmo-coderbots[bot] wants to merge 1 commit into
mainfrom
chore/allow-trycloudflare-dev-origin
Open

Allow *.trycloudflare.com as a dev origin#4
cosmo-coderbots[bot] wants to merge 1 commit into
mainfrom
chore/allow-trycloudflare-dev-origin

Conversation

@cosmo-coderbots

Copy link
Copy Markdown

Summary

Adds *.trycloudflare.com to allowedDevOrigins in next.config.ts so the dev server accepts HMR and RSC requests when exposed via a Cloudflare quick tunnel (cloudflared tunnel --url http://localhost:3000).

Without this, Next.js blocks cross-origin requests from the tunnel hostname, which prevents client components from hydrating — including things like the file-input onChange handler on /profile, which manifests as "picking a file does nothing".

Test plan

  • npm run build succeeds
  • Started dev server, exposed it via a trycloudflare tunnel, and verified the avatar-upload file picker fires onChange and the preview + submit work end-to-end

🤖 Generated with Claude Code

When testing the dev server through a Cloudflare quick tunnel
(`cloudflared tunnel --url http://localhost:3000`), Next.js otherwise
blocks HMR and RSC requests from the tunnel hostname, which breaks
client component hydration — including things like the file-input
`onChange` handler on the profile page.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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