黑白帽SEO,跨境电商,外贸独立站,站群

https中请求http资源报错Mixed Content

在改造网站https的时候,在不少页面发现如下警报:

Mixed Content: The page at ‘xxx’ was loaded over HTTPS, but requested an insecure resource ‘xxx’. This request has been blocked; the content must be served over HTTPS.

解决办法

页面的head中加入:

<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">

注意:只在需要的网页上加上面的语句,其它不需要的不要加,不然会出错的。

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址