Closed Yovach closed 11 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
next-international | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Oct 27, 2023 8:28pm |
I checked and it shouldn't be a problem.
We can use the init
parameter of NextResponse.redirect and NextResponse.rewrite but it'll pass all headers
The fact that Set-Cookie
is set on each request is probably an issue because it'll break sites that are using Cookie parameters.
I just noticed that this also removes things like "HttpOnly" and "Secure" so the PR doesn't seems to be ready yet :/
With my latest commit, the problem seems to have been solved as the Next-Locale cookie is only applied if necessary. I've tried this when we change the locale by url (http://localhost:3000/en => http://localhost:3000/fr) and it doesn't clear my current cookies.
Fixes #212
The
response
fromNextResponse.next
andNextResponse.redirect
doesn't contains any cookies except theNext-Locale
set by the middleware.At first, I wanted to clone the
headers
but this added a lot of elements that were not included in the basic Server ActionsEDIT: I've just noticed that the "Set-Cookie" header was defined for each request, which isn't great.