You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
浏览器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.
报错信息类型
浏览器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下均能够正常访问资源。
The text was updated successfully, but these errors were encountered: