复现问题
发送请求到 http://localhost:8009 的时候,就会被阻止,并且报这样的错:
net::ERR_FAILED (ERR_FAILED)(How to fix Chrome block your insecure private network requests)
![](https://img.haomeiwen.com/i13239113/80f0a0fc5449c2e4.png)
报错
Access to fetch at ‘...’ 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’
解决方法
- 浏览器访问地址
chrome://flags/#block-insecure-private-network-requests
- 设置为 Disabled
![](https://img.haomeiwen.com/i13239113/03c481668d09c45e.png)
- 重启浏览器
网友评论