We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
System: Platform: darwin Arch: x64 Version: Darwin Kernel Version 24.1.0: Thu Oct 10 21:02:27 PDT 2024; root:xnu-11215.41.3~2/RELEASE_X86_64 CPU: (8) x64 Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz Memory: 32 GB Shell: /bin/zsh Package Manager Used: pnpm (9.14.2)
Relevant Packages: @cloudflare/next-on-pages: 1.13.7 vercel: N/A next: 15.0.3
Using @edge-csrf/nextjs in middleware produces the error:
TypeError: This ReadableStream is disturbed (has already been read from) and cannot be used as a body.
Presumably this is because @edge-csrf/nextjs the parses the request body but it's still unexpected because the library only uses edge API methods to parse the request: https://github.com/kubetail-org/edge-csrf/blob/main/shared/src/util.ts#L64-L122
I created a version of @edge-csrf/nextjs that clones the request before parsing it but I'm still getting the same error: https://github.com/kubetail-org/edge-csrf/blob/2.5.3-cloudflare/packages/nextjs/src/index.ts#L66
This example project uses next@15 and @edge-csrf/[email protected]: https://github.com/kubetail-org/edge-csrf/tree/2.5.3-cloudflare/examples/next15-cloudflare-pages
Direct Upload (wrangler pages publish or the @cloudflare/pages-action GitHub Action)
wrangler pages publish
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
next-on-pages environment related information
System:
Platform: darwin
Arch: x64
Version: Darwin Kernel Version 24.1.0: Thu Oct 10 21:02:27 PDT 2024; root:xnu-11215.41.3~2/RELEASE_X86_64
CPU: (8) x64 Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
Memory: 32 GB
Shell: /bin/zsh
Package Manager Used: pnpm (9.14.2)
Relevant Packages:
@cloudflare/next-on-pages: 1.13.7
vercel: N/A
next: 15.0.3
Description
Using @edge-csrf/nextjs in middleware produces the error:
Presumably this is because @edge-csrf/nextjs the parses the request body but it's still unexpected because the library only uses edge API methods to parse the request:
https://github.com/kubetail-org/edge-csrf/blob/main/shared/src/util.ts#L64-L122
I created a version of @edge-csrf/nextjs that clones the request before parsing it but I'm still getting the same error:
https://github.com/kubetail-org/edge-csrf/blob/2.5.3-cloudflare/packages/nextjs/src/index.ts#L66
Reproduction
This example project uses next@15 and @edge-csrf/[email protected]:
https://github.com/kubetail-org/edge-csrf/tree/2.5.3-cloudflare/examples/next15-cloudflare-pages
Pages Deployment Method
Direct Upload (
wrangler pages publish
or the @cloudflare/pages-action GitHub Action)Pages Deployment ID
No response
Additional Information
No response
Would you like to help?
The text was updated successfully, but these errors were encountered: