Skip to content
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

https模式下出现了Mixed Content异常 #375

Closed
meta-bowen opened this issue Jul 23, 2021 · 1 comment
Closed

https模式下出现了Mixed Content异常 #375

meta-bowen opened this issue Jul 23, 2021 · 1 comment

Comments

@meta-bowen
Copy link

meta-bowen commented Jul 23, 2021

报错信息类型

浏览器Chrome:
Mixed Content: The page at 'blob:https:///' was loaded over HTTPS, but requested an insecure script 'http://***/static/js/v0.4.25.js'. This request has been blocked; the content must be served over HTTPS.

简要描述

在https模式下,项目的静态资源访问是http方式,因此出现了Mixed Content使得浏览器直接block掉资源,最终导致页面无法正常加载。

经查证是编译后dist/static/js/0.*.js文件中涉及到对dist/static/js/v0.4.25.js等引用,而引用格式为:url:"http://"+this.host+"/static/js/v0...js"

这在http模式下没有问题,资源能够正常加载,但在https模式下出现了如上问题。当将url:"http://"+this.host+"/static/js/v0...js"中的http修改为https后,https模式下资源能够正常加载。

因以上dist/static/js/0.***.js文件是编译生成的,因此代码中应该有配置的地方,个人对前端不太了解,因此希望能够做下兼容处理。在http和https下均能够正常访问资源。

@CodingCattwo
Copy link
Contributor

最新版webase已修复https下加载soldiity js文件的问题,感谢反馈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants