-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Trailing slash normalization always redirects against root #13718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
trailingSlash
redirects against root instead of dynamic basetrailingSlash
always redirects against root
trailingSlash
always redirects against root
I think the issue is that Express strips the mount path from the request URL, so if you have |
Sorry, after thinking about it more, the fix you've proposed should work even if the URL passed to SvelteKit is missing the base path. For example, if the requested path is |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
Related: #595 and #13702.
I need to integrate a SvelteKit app into an existing Express.js server at a dynamic base path. Based on #595 (comment) I assume this is intended to be supported through the
kit.paths.relative
option, but trailing slash normalization seems to assume SvelteKit is top dog and redirects against the root.Standard static
paths.base
behavior (repro branch)With a configuration like this:
...and integration into a custom server like this:
/sveltekit/sverdle/
is correctly redirected to/sveltekit/sverdle
.Dynamic
paths.base
attempt (repro branch)With a configuration like this:
...and integration like this:
/sveltekit/sverdle/
is incorrectly redirected to/sverdle
.Reproduction
HoldYourWaffle/sveltekit-express-dynamic-basepath, specifically
repro--static-base
andrepro--dynamic-base
.System Info
Severity
blocking all usage of SvelteKit
Additional Information
The
Location
header is allowed to be relative (MDN), so I think this should be an easy fix?™Already working on a PR :)
The text was updated successfully, but these errors were encountered: