You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Vercel skew protection: SameSite=Strict on the __vdpl cookie causes asset 404s after cross-site navigations #4414
nitropack 2.13.4 (via Nuxt 4), vercel preset, Node 24. Vercel project with Skew Protection enabled and prerendered routes.
Reproduction
Needs a live Vercel deployment (the cookie routing happens on Vercel's edge), so a StackBlitz cannot show it. Observable with curl against any Nitro app deployed twice with skew protection on. dpl_OLD is the previous deployment's ID, NEWCHUNK.js is a hashed asset that only exists in the current build:
Strict cookies are omitted on cross-site top-level navigations but sent on the page's same-site subresource requests. A user who last visited before a deploy and returns via any cross-site link (search, chat, even the Vercel dashboard) therefore gets the newest HTML, while their /_nuxt/* requests carry the stale pin and are routed to the old deployment, which lacks the new chunks. Every script 404s and the page fails to boot. Since the cookie is an HttpOnly session cookie, a hard reload does not recover; only clearing cookies does.
Suggested fix: SameSite=Lax, which is also sent on cross-site top-level GET navigations, so the document and its assets always pin to the same deployment. The cookie only selects a deployment version, so Strict adds no security value here. Happy to send a PR.
Additional context
Prerendered documents served as Vercel edge cache HITs never refresh the pin (the Set-Cookie only appears on function responses), so a stale pin can persist for a whole browser session. With Lax this becomes harmless (consistent old-version pages). Feature introduced in #3787 / #3850.
Activity