Access to XMLHttpRequest at ‘file:///D:/xx/xxx.json‘ from origin ‘null‘ has been blocked by CORS问题解决_readxmldom.html:20 access to xmlhttprequest at 'fi_oscar999的博客-CSDN博客

网站介绍:文章浏览阅读8.7k次,点赞3次,收藏7次。在浏览器打开本地的html文件, 上面proxy中的url获取的就是一个本地文件, 协议是file://,如果是在服务器启动的话,则使用的是http或者https协议。出于安全性考虑, Chrome默认禁止了这种用法,file协议和http/https协议不同,会被Chrome认为是跨域访问,所以会报被CORS(Cross-Origin Resource Sharing,跨域资源共享)的安全策略阻止。_readxmldom.html:20 access to xmlhttprequest at 'file:///d:/it/xml/src/note.x