-
Notifications
You must be signed in to change notification settings - Fork 59.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] 配置阿里的通义千问报错,显示 cors限制 #4980
Comments
Title: [Bug] Configure Alibaba's Tongyi Qianwen to report errors and display cors restrictions |
通义千问目前不支持跨域请求,当下只有修改源代码中的地址才行 Tongyi Qianwen does not currently support cross-domain requests. Currently, the only way to do this is to modify the address in the source code. |
直接填写官方的地址,在浏览器发请求会触发跨域错误。 |
Directly filling in the official address and making a request in the browser will trigger a cross-domain error. |
Bug Description
Access to fetch at 'https://dashscope.aliyuncs.com/api/v1/services/aigc/text-generation/generation' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
应该如何处理?
Steps to Reproduce
1 配置ALIBABA_API_KEY和ALIBABA_URL
Expected Behavior
配置通义千问的api结果报错,提示cors错误。
Screenshots
No response
Deployment Method
Desktop OS
No response
Desktop Browser
No response
Desktop Browser Version
No response
Smartphone Device
No response
Smartphone OS
No response
Smartphone Browser
No response
Smartphone Browser Version
No response
Additional Logs
No response
The text was updated successfully, but these errors were encountered: