-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Open
Labels
HeadersRelated to the async headers() function.Related to the async headers() function.
Description
Link to the code that reproduces this issue
https://github.com/yoohahn/next-redirect-issue
To Reproduce
- yarn install
- yarn build ; yarn start
- Open Network Tab and then visit http://localhost:3000/en/foo/redirect
Current vs. Expected behavior
When we have a catch all slug that we force-static
we get odd behavior using the redirect()
You will get a 307 with 2 Location headers. And there is a Cache time on the 307 redirect (should not be cached).

Using OpenNext adapter will make it even worse since it will concatinate the headers into a comma list
- yarn preview
- Open Network Tab and then visit http://localhost:3000/en/foo/redirect

Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:51 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T8112
Available memory (MB): 16384
Available CPU cores: 8
Binaries:
Node: 24.1.0
npm: 11.3.0
Yarn: 4.9.4
pnpm: N/A
Relevant Packages:
next: 15.5.1-canary.9
eslint-config-next: N/A
react: 19.1.0
react-dom: 19.1.0
typescript: 5.9.2
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Headers
Which stage(s) are affected? (Select all that apply)
next start (local)
Additional context
When deploying to Vercel we do not get multiple headers nor does it get cached.

This is the expected behaviour running it with start as well.
avernikoz
Metadata
Metadata
Assignees
Labels
HeadersRelated to the async headers() function.Related to the async headers() function.