这段时间给线上项目加了个https证书,有的页面报错了
报错页面
HTTPS 是 HTTP over Secure Socket Layer,以安全为目标的 HTTP 通道,所以在 HTTPS 承载的页面上不允许出现 http 请求,一旦出现就是提示或报错:
然后大致查了一下解决方案
在页面<head></head>中添加
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
就可以让你页面上所有的非http请求强制转成https请求,以更好的使用SSL
协议.