fix: update fetch options to include target URL in buildRelayRequest
This commit is contained in:
+1
-1
@@ -43,7 +43,7 @@ export default async function handler(req: Request): Promise<Response> {
|
||||
}
|
||||
|
||||
const headers = stripRelayHeaders(new Headers(req.headers));
|
||||
const fetchOptions = buildRelayRequest(req, headers);
|
||||
const fetchOptions = buildRelayRequest(req, targetUrl, headers);
|
||||
|
||||
const response = await fetch(targetUrl, fetchOptions);
|
||||
return createRelayResponse(response);
|
||||
|
||||
+1
-7
@@ -2,11 +2,5 @@
|
||||
"$schema": "https://openapi.vercel.sh/vercel.json",
|
||||
"bunVersion": "1",
|
||||
"installCommand": "bun install",
|
||||
"outputDirectory": "dist",
|
||||
"rewrites": [
|
||||
{
|
||||
"source": "/api/(.*)",
|
||||
"destination": "/api/index.ts"
|
||||
}
|
||||
]
|
||||
"outputDirectory": "dist"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user