fix: update fetch API endpoint and adjust rewrites in vercel.json

This commit is contained in:
MythEclipse
2026-05-07 19:59:34 +07:00
parent 6f28d18b95
commit e5de4bbbfb
2 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -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,
+7 -1
View File
@@ -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" }
]
}