-
Notifications
You must be signed in to change notification settings - Fork 45
[BUG] Streaming does not work for API routes #152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@dandoen I was playing with your example this morning and noted something: The stream route is statically rendered If you force the route to be dynamic: export async function GET(request: NextRequest) {
headers().has("whatever");
// ...
}); Then the route is dynamic: And streaming works as expected. Still |
Oh wow, good spot. Confirmed. Thx @vicb |
We should keep this one opened while we figure out why it doesn't work for pre-rendered pages |
This one can be closed, this is expected. |
Describe the bug
See #102 (comment) (reported by @dandoen)
Streaming does not work for API routes (The whole response is sent at once)
Steps to reproduce
Use the code in the linked comment
Expected behavior
Streaming works
@opennextjs/cloudflare version
experimental branch as of Dec 6
Node.js version
22
Wrangler version
Custom - > 3.92
next info output
Additional context
No response
The text was updated successfully, but these errors were encountered: