Repository navigation
fix: support all bundle strategies with Vercel Skew Protection - #17731
Conversation
|
Install the latest version of pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/3438d742430b1741a0fd6d568db3a25053f54714Open in Note This PR is from a fork. A maintainer must approve approve each commit before it can be built and installed. |
🦋 Changeset detectedLatest commit: 3438d74 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@svelte-triage-bot remove the current test changes as they are redundant. Add a todo comment in the platform tests to add a skew protection test once #17732 is resolved |
|
Implemented the PR follow-up in commit Recorded the feedback in svelte-agent#84 and opened an implementation PR: svelte-agent#85. |
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @sveltejs/[email protected] ### Patch Changes - fix: set `X-Accel-Buffering: no` on `text/event-stream` responses whose content type has parameters, such as `charset=utf-8` ([#17687](#17687)) - Updated dependencies: - @sveltejs/[email protected] ## @sveltejs/[email protected] ### Patch Changes - fix: support all bundle strategies with Vercel Skew Protection ([#17731](#17731)) - Updated dependencies: - @sveltejs/[email protected] ## @sveltejs/[email protected] ### Patch Changes - fix: check the return value of async `load` functions against `App.PageData` ([#17793](#17793)) - fix: prerender crawler finds links located after a quoted attribute value ending with `\` ([#17688](#17688)) - fix: omit nopush from preload Link headers so Chromium can use CDN Early Hints ([#17786](#17786)) - perf: hash a page's encoded bytes for its `ETag` and send the same bytes as the body, and skip the hash when `setHeaders` already sets an `etag` or the response is `no-store` ([#17674](#17674)) - chore: deprecate `adapter.emulate` ([#17769](#17769)) - fix: generate valid types for route params whose names start with a digit, such as `[2nd]` ([#17661](#17661)) - perf: skip the `ETag` hash for a page that has a CSP nonce in it, since no two responses are the same ([#17743](#17743)) - fix: correctly scan routes on Windows when optimising dependencies ([#17757](#17757)) ## @sveltejs/[email protected] ### Patch Changes - fix: remove transformed output files when sources are deleted in watch mode ([#17519](#17519)) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Fixes #17730
Skew Protection currently scans
immutable/entryforstart.*to attach the cookie that exemptsversion.jsonfrom deployment pinning. Single bundles have no such directory, so adaptation fails after the client/server builds succeed. Inline bundles likewise have no external entry request.The separate-response workaround introduced in #11987 was necessary because the legacy route headers map could not express multiple cookies. Vercel's current Build Output API supports appending response headers with multiple values, and the adapter already uses routing transforms.
This removes the obsolete entry scan and appends both independent
Set-Cookievalues on the existing document route. The deployment cookie and the more-specific empty version cookie retain their scopes and security attributes; the exemption is now installed on the HTML response rather than a later JavaScript response. Branching the scan for each bundle strategy would retain unnecessary dependence on output filenames and entry requests, especially since inline output files are removed by #16025.This covers split, single, and inline output, SSR and prerendered documents, and custom
paths.base/appDir, without changing ISR dispatch, immutable caching, filesystem routing, or missing-asset handling.