Harry-zklcdc / go-proxy-bingai

用 Vue3 和 Go 搭建的微软 New Bing 演示站点,拥有一致的 UI 体验,支持 ChatGPT 提示词,支持 API 调用,国内可用。
https://www.b1ng.chat
MIT License
4.17k stars 6.36k forks source link

Go_Proxy_BingAI_AUTH_KEY支持多个访问码 #416

Closed chengtx809 closed 3 months ago

chengtx809 commented 4 months ago

解决了 #407 ,现已支持多访问码,使用逗号来隔开多个密码 如将Go_Proxy_BingAI_AUTH_KEY设为"123,abc,666" 则用户输入访问码"123""abc""666"均可通过验证 (初中牲第一次写go,还望大佬指教🙏)

codesandbox[bot] commented 4 months ago

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders
Open Preview

vercel[bot] commented 4 months ago

@chengtx809 is attempting to deploy a commit to the harryzklcdc's projects Team on Vercel.

A member of the Team first needs to authorize it.

Harry-zklcdc commented 3 months ago

其实可以直接调用 common.IsInArray(arr []string, str string) 的, 而且 env 初始化没有检查,这样写有点浪费性能

chengtx809 commented 3 months ago

其实可以直接调用 common.IsInArray(arr []string, str string) 的, 而且 env 初始化没有检查,~这样写有点浪费性能~

纯go新手不费啊😭要不佬你改改

chengtx809 commented 3 months ago

在copilot的帮助下我好像大概理解了,我试试改下

chengtx809 commented 3 months ago

@Harry-zklcdc 大佬你看看我最新提的那个commit,我优化了下,也加了环境变量为空值的判断🙏

Harry-zklcdc commented 3 months ago

Commit: 1292d3715fe01cd4de2f16eafd74ce9e1956d00b