Skip to content

Commit dc6365d

Browse files
kevincodex1claude
andcommitted
Add Vercel rewrites for API proxy and SPA fallback
The Vite dev proxy (/api, /node-info → node.gitlawb.com) only exists in the dev server, so the deployed static build 404'd every API call. vercel.json now mirrors the proxy in production and adds an SPA fallback so client-side routes survive refresh/deep links. Also ignores the .vercel project-link directory. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 253669b commit dc6365d

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ dist-ssr
2222
*.njsproj
2323
*.sln
2424
*.sw?
25+
.vercel

vercel.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"rewrites": [
3+
{ "source": "/api/:path*", "destination": "https://node.gitlawb.com/api/:path*" },
4+
{ "source": "/node-info", "destination": "https://node.gitlawb.com/" },
5+
{ "source": "/(.*)", "destination": "/index.html" }
6+
]
7+
}

0 commit comments

Comments
 (0)