解决谷歌浏览器最新chrome94版本CORS跨域问题
2023-01-15 本文已影响0人
felixfeihu
CORS跨域问题:
升级谷歌浏览器最新chrome94版本后,提示Access to XMLHttpRequest at http://localhost:xxxx/api
from origin http://xxx.xxx.com:xxx
has been blocked by CORS policy: The request client is not a secure context and the resource is in more-private address space local
.
![](https://img.haomeiwen.com/i5316607/c0e56d8dd0934a68.png)
解决办法:
打开浏览器,复制
chrome://flags/
到浏览器地址栏搜索
Block insecure private network requests
,将设置为Disabled
,然后Relaunch
就好了。![](https://img.haomeiwen.com/i5316607/b2fceb4d8ad0b515.png)