如上图,index.html无法正常显示,其引用的css文件加载失败,单独打开还提示服务器已拒绝连接
后发现这个网站没有使用https,页面上的所有http请求地址却变了https请求地址,查看index源码,发现下面一行代码:
页面上存在这一行meta,等同于在header中添加 Content-Security-Policy 为true,会将页面中的http请求变成https请求
在页面中删除此行代码
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
就解决了以上问题。