From 4f87241a2374d950638a530383b955aeff3bd1e2 Mon Sep 17 00:00:00 2001 From: ponxu Date: Thu, 6 Apr 2023 17:20:48 +0800 Subject: [PATCH] Update cloudflare-worker.js fix: typo --- cloudflare-worker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudflare-worker.js b/cloudflare-worker.js index 9005b2a..3d5185f 100644 --- a/cloudflare-worker.js +++ b/cloudflare-worker.js @@ -6,7 +6,7 @@ async function handleRequest(request) { const url = new URL(request.url); const fetchAPI = request.url.replace(url.host, 'api.openai.com'); - // 部分代理工具,请求又浏览器发起,跨域请求时会先发送一个 preflight 进行检查,也就是 OPTIONS 请求 + // 部分代理工具,请求由浏览器发起,跨域请求时会先发送一个 preflight 进行检查,也就是 OPTIONS 请求 // 需要响应该请求,否则后续的 POST 会失败 const corsHeaders = { 'Access-Control-Allow-Origin': '*',