Open
Description
Link to the code that reproduces this issue
To Reproduce
In developement
- Start the application in development (next dev)
- Click
redirect in server actions to /test
x-action-redirect
header is empty- There are two response: server action response and an unknown rsc payload quest
In production
- Start the application in production (next build && next dev)
- Click
redirect in server actions to /test
x-action-redirect
header exists- There is an only server action response
Current vs. Expected behavior
I found that redirect()
in server actions works differently between production and development environments. In production, a server action request that redirects to '/test' returns a 303 Response that has RSC payloads. However, in development, despite this, an unknown request with an RSC payload still occurs. Does it work correctly?
production
prod.mov
development
dev.mov
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.1.0: Thu Oct 10 21:06:23 PDT 2024; root:xnu-11215.41.3~3/RELEASE_ARM64_T8132
Available memory (MB): 32768
Available CPU cores: 10
Binaries:
Node: 22.11.0
npm: 10.9.0
Yarn: N/A
pnpm: 9.15.4
Relevant Packages:
next: 15.3.0-canary.1 // Latest available version is detected (15.3.0-canary.1).
eslint-config-next: N/A
react: 19.0.0
react-dom: 19.0.0
typescript: 5.8.2
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Server Actions
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
No response