diff --git a/public/index.html b/public/index.html index 3c764a8..27e6edb 100644 --- a/public/index.html +++ b/public/index.html @@ -38,7 +38,7 @@ try { const start = Date.now(); - const res = await fetch('/api', { + const res = await fetch('/', { method: 'POST', headers: { 'x-relay-target': target, diff --git a/vercel.json b/vercel.json index 9fbbe05..09fe439 100644 --- a/vercel.json +++ b/vercel.json @@ -1,5 +1,11 @@ { "$schema": "https://openapi.vercel.sh/vercel.json", "bunVersion": "1", - "installCommand": "bun install" + "installCommand": "bun install", + "rewrites": [ + { "source": "/api", "destination": "/api/index.ts" }, + { "source": "/api/(.*)", "destination": "/api/index.ts" }, + { "source": "/public/(.*)", "destination": "/public/$1" }, + { "source": "/(.*)", "destination": "/public/$1" } + ] } \ No newline at end of file