技术教程
当前位置:首页 > 技术教程

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

( 更新:03-31   加入收藏)
在页面<head>头部中增加代码
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
这样会将页面中的http请求强制转换为https。
相关阅读