js代码中https页面无法发起http请求、以及将所有http请求转换为https请求的解决方案

在页面<head>头部中增加代码
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
这样会将页面中的http请求强制转换为https。

评论

暂无评论