Skip to content

Commit

Permalink
Update cloudflare-worker.js
Browse files Browse the repository at this point in the history
fix: typo
  • Loading branch information
ponxu authored Apr 6, 2023
1 parent 2bf3978 commit 4f87241
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cloudflare-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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': '*',
Expand Down

0 comments on commit 4f87241

Please sign in to comment.