-
Notifications
You must be signed in to change notification settings - Fork 171
Description
Describe the bug
This is an issue with it's origin within NextJS, but that might be fixable in OpenNext? It is only an issue running NextJS in a self-hosting environment OR deploying using OpenNext (Cloudflare in my case) and not an issue when deploying to Vercel.
Important note is that this has only been seen on a route that is a catch all slug with the force-static
flag set.
Steps to reproduce
- https://github.com/yoohahn/next-redirect-issue
- yarn install
- yarn preview
- Have the Network Tab Open and then visit http://localhost:3000/en/foo/redirect
In open next we get a chain of 307 -> 200.
- First will be a 307 with cache headers on it.Open Next:

Since NextJS sends 2 Location headers this two will get joined into a comma list. But there is no way for us to act on this since it is far into the redirect chain.
No cache and only 1 Location header NOT comma separated.
- And then sent to the url with comma list

Next time I visit the same url it acts as I expect. So it is only an issue the first visit.
Expected behaviour
- Only 1 Location and not being a comma list of Locations.
- No cache on the 307
@opennextjs/cloudflare version
1.6.5
Wrangler version
4.28.1
next info output
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
Additional info
I have deployed this worker to Cloudflare with the exact same behaviour as in
