Skip to content

Commit 888819c

Browse files
committed
fix: use URL.href for Request constructor to resolve TypeScript error
1 parent 74b716f commit 888819c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/backend/api/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export default async function handler(req: any, res: any) {
6363
const host = req.headers.host;
6464
const url = new URL(req.url, `${protocol}://${host}`);
6565

66-
const request = new Request(url, {
66+
const request = new Request(url.href, {
6767
method: req.method,
6868
headers: req.headers,
6969
body: req.method !== "GET" && req.method !== "HEAD" ? JSON.stringify(req.body) : undefined,

0 commit comments

Comments
 (0)