APP:// CORS问题
conql opened this issue · comments
conql commented
使用OpenAI Node API库请求时会导致CORS错误。
Minghan Zhang commented
自定义请求头一般是不会影响的,目测可能是app:// scheme的问题
conql commented
自定义请求头一般是不会影响的,目测可能是app:// scheme的问题
又测试了一下,好像不是
复现代码:
await fetch("https://api.chatnio.net/v1/models",{
method:"GET",
headers:{
}
}).then(t=>t.json()).then(t=>console.log("No header",t))
await fetch("https://api.chatnio.net/v1/models",{
method:"GET",
headers:{
"X-Stainless-Lang":"js"
}
}).then(t=>t.json()).then(t=>console.log("Has header",t))
Minghan Zhang commented
这是你的app的问题吧
conql commented
conql commented
在 https://chatnio.net 上跑也一样
Minghan Zhang commented
浏览器?
conql commented
是的
Minghan Zhang commented
OK 复现到了 等我处理完 #77 来处理
Minghan Zhang commented
商业版和chatnio官网已经修复,功能将由 @Sh1n3zZ 下放开源版。