-
Notifications
You must be signed in to change notification settings - Fork 132
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
Ollama等 API 接口在油猴脚本状态下会被CSP拦截 #223
Comments
需要设置 |
已经设置了 |
油猴版本有个bug,导致请求由网页发出 kiss-translator/src/libs/fetch.js Line 96 in 72ccfc8
暂时的解决方案是在脚本里加上不带端口的connect:
|
判断不在安全列表中,才尝试通过网页发出请求。 这不算是bug,油猴脚本必须将API的域名添加到 |
我看了一下tampermonkey的文档,意思应该是ip不需要带端口,只需要 https://www.tampermonkey.net/documentation.php?locale=en#meta:connect |
@fishjar 油猴脚本是允许在配置中添加除connect项目列出外的自定义域名的,按理说如果kiss不做这种检查,油猴脚本也会跳出UI让用户选择是否允许连接。 或者能否从ui上设置?这样就不用每次升级去改一次脚本。 |
如果如你所说,油猴脚本允许在配置中自行添加域名,那确实应该把这个检查去掉。 |
可以考虑去掉端口,还省一些代码 |
Ollama等 API 接口在油猴脚本状态下会被CSP拦截
The text was updated successfully, but these errors were encountered: