强制html以https格式访问引入文件

<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
页面上存在这一行meta,等同于在header中添加 Content-Security-Policy  为true,
会将页面中的http请求变成https请求
如果引入index.css 
本身 http://www.xxxx.com/index.css
会自动转化 https://www.xxxx.com/index.css
posted @ 2021-12-09 10:19  盘思动  阅读(711)  评论(0编辑  收藏  举报