离子XHR加载失败:POST

时间:2016-07-09 19:04:44

标签: angularjs ionic-framework

我收到了这个错误:

XMLHttpRequest cannot load http://localhost/authproject/public/api/auth/login. 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:8101' is therefore not allowed access.
ionic.bundle.js:15567 XHR failed loading: POST 

有人能告诉我如何解决这个问题?

1 个答案:

答案 0 :(得分:1)

您是否尝试在浏览器上安装CORS并启用它?