admin管理员组

文章数量:1397058

I'm running an Angular script that performs an $http.get(...) on a REST resource located at http://localhost:7700, but it's executing from a page served at http://localhost:4400. I'm not certain if this is the problem, but it results in the error() callback firing, with a status of 0, and nothing in the data parameter. Any ideas on why this would be happening?

I'm running an Angular script that performs an $http.get(...) on a REST resource located at http://localhost:7700, but it's executing from a page served at http://localhost:4400. I'm not certain if this is the problem, but it results in the error() callback firing, with a status of 0, and nothing in the data parameter. Any ideas on why this would be happening?

Share Improve this question asked Mar 30, 2013 at 2:37 brushleafbrushleaf 1,2154 gold badges18 silver badges26 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 9

Same origin policy is protocol + host + port

You would need to enable CORS support to allow this situation

本文标签: javascriptAngular httpget to same host but different port fails with no meaningful errorStack Overflow