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,不然肯定报错

未经允许不得转载:Java爱好者 » the content must be served over HTTPS 解决方案一

赞 (0) 打赏