Chrome浏览器本地调试:阻止不安全、本地网络请求
今天打开Chrome浏览器,本地开发联调突然报错。
Access to script at 'http://localhost:3000/xxx.js' from origin 'http://xxxx.com' has been blocked by CORS policy: The request client is not a secure context and the resource is in more-private address spacelocal.
报错说我本地的文件因为跨域安全被阻止访问了。那我们本地调试就改一下Chrome的配置吧。
打开新的网页,浏览器输入:chrome://flags/#block-insecure-private-network-requests
禁用即可
Comments