sst / open-next

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

Fix for lambda streaming on empty body #443

Closed conico974 closed 2 weeks ago

conico974 commented 2 weeks ago

This PR add an env variable OPEN_NEXT_FORCE_NON_EMPTY_RESPONSE, when set to true it will force writing something to the stream.

This should only be used with lambda streaming AND if you have issues with the stream hanging on empty body response (i.e. HEAD request, redirect...). See this discord thread You should avoid using this as much as you can, because it modifies the response you send ( It might break some very specific cases )

It is disabled by default.

changeset-bot[bot] commented 2 weeks ago

🦋 Changeset detected

Latest commit: 3e73c4aa9ac8d67cdc38a83ccdb0481a212956fa

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages | Name | Type | | ---------------- | ----- | | open-next | Patch | | app-pages-router | Patch | | app-router | Patch |

Not sure what this means? Click here to learn what changesets are.

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

vercel[bot] commented 2 weeks 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 14, 2024 9:40am