-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
API Route always returns 404 on Vercel depending on trailingSlash #9206
Comments
Does not just affect vercel. The combination of base and trailingSlash is sufficient to break routing. defineConfig({
base: "/",
trailingSlash: "always"
}) |
i am not sure if |
I thought |
I checked and removing |
Is |
This issue is that astro's We could make |
I think I've a similar issue with /_image and Vercel. If I enable trailingSlash: true in vercel.json, all images stop working on SSR pages, since Vercel is changing the /_image URL to /_image/. And it looks like trailingSlash: 'always' doesn't affect the /_image endpoint? |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
When setting
trailingSlash
in both astro and vercel configs, I think there is some conflict that causes API routes to always be 404.What's the expected result?
The route
/api/test/
should return some json. Here is the deployment: https://astro-vercel-endpoint-issue.vercel.app/api/test/Link to Minimal Reproducible Example
https://github.com/florian-lefebvre/astro-vercel-endpoint-issue
Participation
The text was updated successfully, but these errors were encountered: