sst / open-next

Open source Next.js serverless adapter
https://open-next.js.org
MIT License
3.7k stars 111 forks source link

Pass __nextDataReq in the middleware query params if already present #455

Closed vladiulianbogdan closed 1 week ago

vladiulianbogdan commented 1 week ago

I've noticed that the response returned by the _next/data/.../middleware-geolocation.json endpoint is an entire HTML page instead of a JSON containing the props. I've also deployed the same app on Vercel and it responds with a JSON.

After a discussion with @conico974 on Discord, we came up with this fix.

changeset-bot[bot] commented 1 week ago

⚠️ No Changeset found

Latest commit: a298ea9da8cd9b1568f2036846ddc0844aad3093

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

vercel[bot] commented 1 week ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
open-next ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 26, 2024 8:44am