-
Notifications
You must be signed in to change notification settings - Fork 27.6k
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
Rsc header and query params always null on middleware #65787
Comments
@zecka good catch! Is this the most recent version, Next.js 14.2? |
@tigerabrodi Yes I tested it on 14.2 and 14.3 and Both have the issue |
is there an ETA on this being fixed? Edit by maintainer bot: Comment was automatically minimized because it was considered unhelpful. (If you think this was by mistake, let us know). Please only comment if it adds context to the issue. If you want to express that you have the same problem, use the upvote 👍 on the issue description or subscribe to the issue for updates. Thanks! |
This is currently intended behavior. See e.g. test here next.js/test/e2e/app-dir/navigation/middleware.js Lines 14 to 19 in a5f30e6
|
If it is intended behaviour, why is this issue open as a bug? Maybe change it to feature request? But also my personal opinion kinda weird to hide it. |
It would be pretty nice to have access to the |
One use case: Is there any alternate approach to detect RSC calls ? |
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/nextjs-middleware-get-rsc-query-params-and-header-vfy9hk?file=%2Fmiddleware.ts%3A23%2C15
To Reproduce
Current vs. Expected behavior
Check console query params test is successfully log but _rsc params is null. rsc header is also null
![image](https://private-user-images.githubusercontent.com/18116930/330784985-997f2677-face-414a-817e-1e6226af994b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwMDU0ODksIm5iZiI6MTczOTAwNTE4OSwicGF0aCI6Ii8xODExNjkzMC8zMzA3ODQ5ODUtOTk3ZjI2NzctZmFjZS00MTRhLTgxN2UtMWU2MjI2YWY5OTRiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDA4NTk0OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRlNzYyMzg4NzdlMjliMzUyNmNlYWUxN2I2OGIxMTVmYjdlNTI0NWIwNGJjMjhlZDg3YWY1ZDc5YTQ0YjA0YjQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.FfSjJnsnwT7uhqgXtC08FFh1oSktx8_C66VZYGxA1WQ)
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #1 SMP PREEMPT_DYNAMIC Sun Aug 6 20:05:33 UTC 2023 Available memory (MB): 4102 Available CPU cores: 2 Binaries: Node: 20.9.0 npm: 9.8.1 Yarn: 1.22.19 pnpm: 8.10.2 Relevant Packages: next: 14.3.0-canary.63 // Latest available version is detected (14.3.0-canary.63). eslint-config-next: N/A react: 19.0.0-beta-4508873393-20240430 react-dom: 19.0.0-beta-4508873393-20240430 typescript: 5.1.3 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Middleware
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local), next start (local), Other (Deployed)
Additional context
No response
The text was updated successfully, but these errors were encountered: