No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null'

今天学习vue和axios时进行前后端结合出现了这个错误 No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘null’ 当使用ajax访问远程服务器时,请求失败,浏览器报如上错误。这是出于安全的考虑,默认禁止跨域访问导致的。 一、什么是跨域访问 举个栗子:在A网站中,我们希望使
相关文章
相关标签/搜索