前端

jquery,局部调用另外的html

Access to XMLHttpRequest at 'file:///Users/wangyuqiang/work/gin-vue-frontend-admin/footer.html' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, isolated-app, chrome-extension, chrome, https, chrome-untrusted.

 

本情况只有在浏览本地文件时出现,部署到服务器通过http://xx.xxx.xxx.xx访问则无虞,

另外本地文件通过Safari访问也没有问题,应该是chrome的安全设置问题,防止跨域