在HTTPS网站上获得“已阻止:混合内容" [英] Got “Blocked:mixed content” on HTTPS website

查看:96
本文介绍了在HTTPS网站上获得“已阻止:混合内容"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前行为是什么?

我正在生产中使用Webpack运行网站.

I'm Running a Website using Webpack in Production.

我很惊讶在Chrome控制台中看到以下有关加载与weback和laravel-mix混合的js文件的错误

I was surprised to see in Chrome console the following error about loading the js file which is mixed with weback and laravel-mix

我的问题:

  1. 如何在使用HTTPS协议加载的网站上包含混合内容?
  2. 如何解决该错误?我不打算通过HTTP服务网站,我希望我的 js 在开发和生产中都能正确加载.
  1. How can we have a mixed content on a website loaded using HTTPS protocol?
  2. How can I fix the error? I don't plan to serve website over HTTP and I want my js to load properly both in development and production.

推荐答案

摘自混合内容

要解决此类错误,所有对HTTP内容的请求都应为删除并替换为通过HTTPS提供的内容.一些常见的混合内容的示例包括JavaScript文件,样式表,图片,视频和其他媒体.

To fix this type of error, all requests to HTTP content should be removed and replaced with content served over HTTPS. Some common examples of mixed content include JavaScript files, stylesheets, images, videos, and other media.

这篇关于在HTTPS网站上获得“已阻止:混合内容"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆