fix: strip internal data before passing URL to reroute - #13092
Conversation
🦋 Changeset detectedLatest commit: bcecf13 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 |
To clarify: If we merge this, then we need to adjust the referenced PR to also deal with this case, but it's not something that forces our hand in other places? |
We'd probably need to make the same adjustment if we need to run |
|
preview: https://svelte-dev-git-preview-kit-13092-svelte.vercel.app/ this is an automated message |
fixes #11625
This PR ensures that the
/__data.jsonsuffix,x-sveltekit-trailing-slash, andx-sveltekit-invalidatedquery param are stripped before passing a copy of the URL torerouteso that the URL can be correctly rerouted instead of causing a 404 due to the/__data.jsonpathname suffix.If this PR gets merged, we will need a shared solution for the edge middlewares running
reroutein #12296Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.Edits