CORS跨域问题

升级谷歌浏览器最新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.

报错信息

解决办法

打开浏览器,进入chrome://flags/页面,搜索Block insecure private network requests

设置信息

设置为Disabled,然后点击Relaunch就好了。

Last modification:October 22, 2021
如果觉得我的文章对你有用,请随意赞赏