Chrome浏览器本地调试:阻止不安全、本地网络请求
作者:互联网
今天打开Chrome浏览器,本地开发联调突然报错。
Access to script at 'http://localhost:8001/xxx.js' from origin 'http://xxx.xxx.xxxx.com' 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的配置吧。
打开新的网页,浏览器输入:chrome://flags/#block-insecure-private-network-requests
![](https://www.icode9.com/i/ll/?i=20210924141958515.png?,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBA5ZC055C8X19DYW5kaWNl,size_20,color_FFFFFF,t_70,g_se,x_16)
重新启动一下浏览器,问题就解决啦。
标签:浏览器,Chrome,xxx,private,报错,本地,本地网络 来源: https://blog.csdn.net/fwdwqdwq/article/details/123250866