A-A+

chrome浏览器94版本跨域问题

2021年10月25日 服务器 暂无评论 阅读 3,080 views 次

提示错误:

Access to XMLHttpRequest from origin has been blocked by CORS policy:The request client is not a secure context and the resource is in more-private address space `local`.

 

原因:最新的谷歌和edge升级到94版本后对公网上的http请求下的非同域的http请求进行了拦截。

 

解决方案:

1、所有公网上的web项目都应该使用https证书。所以最好的方案还是将您的公网web项目升级为https方式,即可永久解决此问题。

2、开发环境或临时方案

打开浏览器,进入chrome://flags/页面

搜索Block insecure private network requests

设置为Disabled,Relaunch就好了。

 

 

给我留言