js代码中https页面无法发起http请求、以及将所有http请求转换为https请求的解决方案
文章目录
在页面<head>头部中增加代码
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
这样会将页面中的http请求强制转换为https。
在页面<head>头部中增加代码
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
这样会将页面中的http请求强制转换为https。
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论