跨源请求阻止角度JS post请求

时间:2015-01-20 05:14:31

标签: angularjs cordova

我使用cordova和angular js.当我尝试从我的应用程序登录我的web服务时,我收到以下错误:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the
remote resource at http://devsandipon2.dhaka.vantage.com/webservice.php. This
can be fixed by moving the resource to the same domain or enabling CORS.

有人帮忙吗?

1 个答案:

答案 0 :(得分:2)

您必须在Web服务器上的站点上启用CORS。未经您的许可,CORS会阻止其他网站或应用程序访问您的网络服务。

查看http://enable-cors.org/server.html