- 链接地址:https://oscar.blog.csdn.net/article/details/124114343#comments_23290154
- 链接标题: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博客
- 所属网站:oscar.blog.csdn.net
- 被收藏次数:4789
文章浏览阅读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
版权声明:本文发布于特牛生活网 内容均来源于互联网 如有侵权联系删除