- Create api/relay.ts: Vercel serverless function handler that reuses relay logic from src/lib/relay-utils.ts and src/middleware/ - Export default fetch handler (no Bun.serve()) for Vercel Functions - Fix vercel.json: use @vercel/node@5 runtime with proper routing via rewrites to catch all traffic to the relay handler - Remove stale buildCommand/outputDirectory (Vercel handles function builds) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
11 lines
163 B
JSON
11 lines
163 B
JSON
{
|
|
"functions": {
|
|
"api/relay.ts": {
|
|
"runtime": "@vercel/node@5"
|
|
}
|
|
},
|
|
"rewrites": [
|
|
{ "source": "/(.*)", "destination": "/api/relay" }
|
|
]
|
|
}
|