fix: #2820 try to fix 520 error code

This commit is contained in:
Yidadaa
2023-09-19 02:12:43 +08:00
parent 61ca60c550
commit adb860b464
5 changed files with 11 additions and 4 deletions

View File

@@ -26,13 +26,18 @@ async function handle(
duplex: "half",
};
console.log("[Any Proxy]", targetUrl);
const fetchResult = await fetch(targetUrl, fetchOptions);
const fetchResult = fetch(targetUrl, fetchOptions);
console.log("[Any Proxy]", targetUrl, {
status: fetchResult.status,
statusText: fetchResult.statusText,
});
return fetchResult;
}
export const POST = handle;
export const GET = handle;
export const OPTIONS = handle;
export const runtime = "edge";