laravel里面使用 axios请求外网json报错,怎么设置请求头


XMLHttpRequest cannot load http://api.laifudao.com/open/xiaohua.json. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.


Vote Vote Cancel Collect Collect Cancel

<< 上一篇: use后报错问题

>> 下一篇: laravel5.5 auth手动认证一直是false