the content must be served over 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.

出现这个的情况一般就是http地址没修改,或配置CDN后出现的结果,很多清空可以通过NGINX或者其他方式解决,但是实在没办法就应用以下方案
解决办法:

页面的head中加入:

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

意思是自动将http的不安全请求升级为https,这个必须你确定你的可以升级的http地址都支持SSL,不然肯定报错

腾讯云服务器安全可靠高性能,多种配置供您选择
avatar

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: