Problem
vercel.json rewrites everything except /api/ to index.html:
{ "source": "/((?!api/).*)", "destination": "/index.html" }
The exclusion correctly avoids rewriting API calls, but nothing else in the configuration serves or proxies /api/. On Vercel those requests hit the static deployment and 404, so the app has no backend.
By contrast, the Docker deployment does define a proxy in nginx.conf (location /api/ { proxy_pass http://indexer:3001; }). The two deployment targets are therefore inconsistent: Docker proxies the API, Vercel does not.
What needs to be done
Files
vercel.json
README.md
- coordinate with
src/api.ts / API base configuration
Acceptance deliverables
- A Vercel deployment can reach a configured indexer;
/api calls no longer 404.
- The three deployment paths are documented and consistent.
Tests to pass
- Documented verification that a deployed build performs a successful API request.
Problem
vercel.jsonrewrites everything except/api/toindex.html:The exclusion correctly avoids rewriting API calls, but nothing else in the configuration serves or proxies
/api/. On Vercel those requests hit the static deployment and 404, so the app has no backend.By contrast, the Docker deployment does define a proxy in
nginx.conf(location /api/ { proxy_pass http://indexer:3001; }). The two deployment targets are therefore inconsistent: Docker proxies the API, Vercel does not.What needs to be done
rewritesentry proxying/api/:path*to the public indexer URL, or configuring an absolute API base URL at build time (see issue Make the backend API base URL configurable for production builds #1) and dropping the/apipath convention on Vercel.vercel.json(and align with the configurable API base work in issue Make the backend API base URL configurable for production builds #1).Files
vercel.jsonREADME.mdsrc/api.ts/ API base configurationAcceptance deliverables
/apicalls no longer 404.Tests to pass