Skip to content
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

Page Endpoint redirects with trailing slash always #5148

Closed
PatrickG opened this issue Jun 3, 2022 · 0 comments · Fixed by #5149
Closed

Page Endpoint redirects with trailing slash always #5148

PatrickG opened this issue Jun 3, 2022 · 0 comments · Fixed by #5149

Comments

@PatrickG
Copy link
Member

PatrickG commented Jun 3, 2022

Describe the bug

When trailingSlash is set to always, the /.../__data.json request gets redirected to /.../.

Reproduction

https://stackblitz.com/edit/sveltejs-kit-template-default-xp9vnn

Click the Click me! link.

Logs

No response

System Info

Not relevant

Severity

serious, but I can work around it

Additional Information

To fix it, we need to subtract 1 from DATA_SUFFIX.length if options.trailing_slash === 'always' here:

decoded = decoded.slice(0, -DATA_SUFFIX.length) || '/';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant