HTTPS 是 HTTP over Secure Socket Layer,以安全为目标的 HTTP 通道,所以在 HTTPS 承载的页面上不允许出现 http 请求,一旦出现就是提示或报错:
Mixed Content: The page at ‘https://www.taobao.com/‘ was loaded over HTTPS, but requested an insecure image ‘http://g.alicdn.com/s.gif’. This content should also be served over HTTPS.
HTTPS改造之后,我们可以在很多页面中看到如下警报:
header("Content-Security-Policy: upgrade-insecure-requests");
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />
转:https://www.cnblogs.com/hustskyking/p/upgrade-insecure-requests.html