zsodur / chatgpt-api-by-browser-script

This project runs on users' browsers through the Tampermonkey script and converts the web version of ChatGPT operations into an API interface. This way, you can use GPT-4 in chatgpt web pages to play things like Auto-GPT. / 该项目通过Tampermonkey脚本在用户的浏览器上运行,并将ChatGPT操作的Web版本转换为API接口。这样,您就可以使用chatgpt网页中的GPT-4来玩Auto-GPT等内容。
206 stars 40 forks source link

Content security policy issue #8

Open sayginburak opened 1 year ago

sayginburak commented 1 year ago

Hello, I get this to work couple days ago. But now it is giving API error. And this is the error in the console. Did OpenAI block such scripts?

userscript.html?name=ChatGPT-API-By-Browser-Script.user.js&id=369ebf7e-0282-49bc-8bcd-1d341d20f2fc:130 Refused to connect to 'ws://localhost:8765/' because it violates the following Content Security Policy directive: "connect-src 'self' o33249.ingest.sentry.io statsigapi.net http://localhost:* https://*.oaistatic.com https://events.statsigapi.net *.oaiusercontent.com api-js.mixpanel.com fileserviceuploadsperm.blob.core.windows.net api-iam.intercom.io wss://fp-async-webps-prod.webpubsub.azure.com https://featuregates.org https://tcr9i.chat.openai.com rum.browser-intake-datadoghq.com https://cdn.openai.com wss://fp-async-webps-staging.webpubsub.azure.com https://chat.openai.com".

azeriker commented 1 year ago

i didnt research how secure it is, but u can disable CSP in chrome by extension. As example: https://chrome.google.com/webstore/detail/disable-content-security/ieelmcmcagommplceebfedjlakkhpden

zhymma commented 1 year ago

can you solve this issue now?