bramblex / niva

一个基于 Tauri WRY 跨端 Webview 库的超轻量极易用的跨端应用开发框架。
https://bramblex.github.io/niva/
MIT License
635 stars 36 forks source link

(能把这个HTTPS限制取消掉嘛)index-47fba8ad.js:52 Mixed Content: The page at 'https://niva.pm_6a1fffce/#/login' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://192.168.0.112:8080/getConfig'. This request has been blocked; the content must be served over HTTPS. #105

Open yuaotianAI opened 9 months ago

yuaotianAI commented 9 months ago

(能把这个HTTPS限制取消掉嘛,打包构建以后必须要使用HTTPS才能访问

index-47fba8ad.js:52 Mixed Content: The page at 'https://niva.pm_6a1fffce/#/login' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://192.168.0.112:8080/getConfig'. This request has been blocked; the content must be served over HTTPS.

yuaotianAI commented 9 months ago

大佬,想办法取消一下内置的 https 把,实在要吐血啊,我是用Java springboot 创建的服务,好不容易把https证书搞上去,结果不行后来打开一看是不信任证书,接口被拦了,必须要手动访问确认一下“继续访问”后续才能放开

yuaotianAI commented 9 months ago

因为我的证书是本地生成的,所以很容易被拦截,自己开发环境无所谓,但是其他人电脑就不太行了

yuaotianAI commented 9 months ago

image 如图片这样

HugStars commented 9 months ago

你用的是浏览器的请求方式吧? 比如ajax,fetch,这些都会受到同源策略限制的。

尝试换成Nive的请求方式呗: Niva.api.http.requestNiva.api.http.getNiva.api.http.post

文档:https://bramblex.github.io/niva/docs/api/http

akssmaw commented 5 months ago

你用的是浏览器的请求方式吧? 比如ajax,fetch,这些都会受到同源策略限制的。

尝试换成Nive的请求方式呗: Niva.api.http.requestNiva.api.http.getNiva.api.http.post

文档:https://bramblex.github.io/niva/docs/api/http

还有别的方法吗 我们也遇到了一样的问题 想无感替换

qwerr0 commented 4 months ago

你用的是浏览器的请求方式吧? 比如ajax,fetch,这些都会受到同源策略限制的。

尝试换成Nive的请求方式呗: Niva.api.http.requestNiva.api.http.getNiva.api.http.post

文档:https://bramblex.github.io/niva/docs/api/http

用 Niva 的请求方式, API能用了, 但是图片还是加载不了