侧边栏壁纸
  • 累计撰写 28 篇文章
  • 累计收到 1 条评论

解决谷歌浏览器最新chrome94+版本CORS跨域问题 has been blocked by CORS policy

2022-3-2 / 0 评论 / 1704 阅读

谷歌浏览器最新chrome94版本后,提示Access to XMLHttpRequest at 'http://localhost:xxxx/api' from origin 'http://xxx.xxx.com:xxxx' has been blocked by CORS policy: The request client is not a secure context and the resource is in more-private address space local.

解决办法:

1、打开浏览器,输入chrome://flags/ 到地址栏,敲回车
2、搜索 Block insecure private network requests
3、设置 Disabled 后,点击 Relaunch 重启浏览器即可。

PS: 设置为Disabled,必须要点击 Relaunch 重启。


扫描二维码,在手机上阅读