Skip to content

Edge runtime routes throw 500 error on trailing slash mismatch #1798

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

Closed
ascorbic opened this issue Nov 22, 2022 · 1 comment · Fixed by #1892
Closed

Edge runtime routes throw 500 error on trailing slash mismatch #1798

ascorbic opened this issue Nov 22, 2022 · 1 comment · Fixed by #1892
Assignees

Comments

@ascorbic
Copy link
Contributor

If trailing slash in disabled, requesting an edge runtime route with a trailing slash will throw a 500 error. This is because the matcher pattern strictly matches just the route without the slash, meaning the site tries to serve the route from the origin which will fail. The expected behaviour is to redirect to the canonical version.

The fix is the trailing slash fix as indicated in #1448, however this may need to happen before the edge router is implemented.

e2e test: streaming-ssr

@ascorbic
Copy link
Contributor Author

ascorbic commented Jan 5, 2023

I think that once excluded_route support for edge functions is merged then we should use it for this, as that would make it a lot easier to selectively target the edge function

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

Successfully merging a pull request may close this issue.

2 participants