vue 接口请求域名http想根据网址上的http/https 转换
vue 接口请求域名http想根据网址上的http/https 转换
·
index.html页面
head标签增加下面这句就可以了
<head>
<script>
if("https:"=== document.location.protocol){
document.write('<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">');
}
</script>
</head>
更多推荐
已为社区贡献4条内容
所有评论(0)