Client-side navigation does not perform trailing slash redirect #8842
Closed
Description
Describe the bug
After building, client-side navigating to an incorrect URL, such as /test/
, does not redirect to its counterpart /test
.
The issue occurs when the preload data attribute is present on the link.
Reproduction
- Run
pnpm build && pnpm preview
. - Click on the link to the page
/test/
Expected
Redirect from /test/
to /test
.
Actual
Client loads /test
page content and does not redirect. Browser URL remains as /test/
.
Logs
No response
System Info
System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 16.14.2 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 7.17.0 - /usr/local/bin/npm
npmPackages:
@sveltejs/adapter-auto: ^1.0.2 => 1.0.2
@sveltejs/kit: ^1.3.8 => 1.3.8
svelte: ^3.55.1 => 3.55.1
vite: ^4.0.4 => 4.0.4
Severity
serious, but I can work around it
Additional Information
No response