haibbo / cf-openai-azure-proxy

A Cloudflare worker script to proxy OpenAI‘s request to Azure OpenAI Service
MIT License
1.66k stars 207 forks source link

fix CORS policy #31

Closed RuochenLyu closed 1 year ago

RuochenLyu commented 1 year ago

修复前在浏览器内通过 fetch 请求时会因为 CORS policy 出错。

Access to fetch at 'https://host/v1/chat/completions' from origin 'host' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.