-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Describe the bug
I would like my path to end up with a trailing slash.
Currently with these lines, svelte kit always remove it :
kit/packages/kit/src/runtime/client/router.js
Lines 185 to 188 in 84e9023
// remove trailing slashes | |
if (location.pathname.endsWith('/') && location.pathname !== '/') { | |
history.replaceState({}, '', `${location.pathname.slice(0, -1)}${location.search}`); | |
} |
Expected behavior
This behavior should at least be configurable.
Having a trailing slash is important to me as ipfs gateways append it anyway and so without being able to keep the trailing slash, there is a different behaviour between SPA navigation and navigation through request.
Plus it cause issue to calculate relative path as without slash the resource is now considered to be in the parent folder
I think trailing slash are more accurate in that regard since on a static website, the corresponding underlying index.html file is in its own folder.
Severity
This is a blocker for me that deploy website on ipfs
I am working on a ipfs adapter to support ipfs properly and I am currently stuck with this.