Angular $http.get to same host but different port fails with no meaningful error

angularjs, javascript

Solution

Same origin policy is protocol + host + port

You would need to enable CORS support to allow this situation

Problem

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?

Original source

Related problems