Skip to content
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

关于跨域问题 #213

Open
zqiyu opened this issue Mar 4, 2024 · 3 comments
Open

关于跨域问题 #213

zqiyu opened this issue Mar 4, 2024 · 3 comments

Comments

@zqiyu
Copy link

zqiyu commented Mar 4, 2024

描述问题
本地运行项目,openai的url设置为自己的代理地址后
对话框中调用的地址报跨域
/v1/chat/completions
nginx已经配置允许跨域,项目中的跨域配置
const CorsHeaders = [ { key: "Access-Control-Allow-Credentials", value: "true" }, { key: "Access-Control-Allow-Origin", value: "*" }, { key: "Access-Control-Allow-Methods", value: "*", }, { key: "Access-Control-Allow-Headers", value: "*", }, { key: "Access-Control-Max-Age", value: "86400", }, ]是否与nginx上的有冲突

如何复现
请告诉我们你是通过什么操作触发的该问题。

截图
image

image

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: About cross-domain issues

@Hk-Gosuto
Copy link
Owner

参考这个issues处理:ChatGPTNextWeb#1931

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Refer to this issues handling: ChatGPTNextWeb#1931

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants