-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
404 no longer sends slug and redirects ending in / no longer work #415
Comments
What do you mean by slug? I checked your reproduction but I don't see any "slug" used. |
I hope this is more clearMaybe slug was the wrong word, I meant the path requested. I'm having trouble parsing the locale from the requested URL when using Astro with the Vercel adapter. In my app, the path after the domain is critical (e.g., Details
Example
Possible CauseThe initial URL parse is based on the Astro docs, but it may have changed, and the Vercel adapter now handles 404s differently. Help NeededI need a solution to properly parse the requested path (and locale) when using the Vercel adapter with Astro, even when the path is invalid. Thanks in advance for your help! 🙏 |
Please provide a valid reproduction. I checked it out, and there's nothing. It's fine if it works locally but not on vercel, I will deploy, but please create a reproduction (it doesn't even use the vercel adapter). Without it, I find it difficult to understand what you're trying to achieve. For example:
Original path? Do you mean that Do you use a custom |
Astro Info
Describe the Bug
As of late, the vercel adapter no longer passes the slug information to the 404 page, and slugs that need to be redirected that end in a '/' cause a 404 instead of being redirected.
Notice that a path of /en/ fails to redirect.
What's the expected result?
Previously, 404 pages had the slug so I could get the locale and have the correct assets and language.
Previously, redirects to pages ending in a slash were working, for example: /en/ successfully redirected to /en-ca/, but now it returns a 404.
Here is a repo with a reproduction: https://github.com/disrae/astro-404-and-redirects-errors
Link to Minimal Reproducible Example
https://astro-404-and-redirects-errors-git-main-disraes-projects.vercel.app/
Participation
The text was updated successfully, but these errors were encountered: