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?
Asked
Active
Viewed 4,118 times
3

brushleaf
- 1,205
- 3
- 18
- 26
1 Answers
9
Same origin policy is protocol + host + port
You would need to enable CORS support to allow this situation

johlrich
- 1,771
- 1
- 12
- 11
-
2for more info on how, see http://stackoverflow.com/questions/15598917/adding-a-custom-header-to-http-request-using-angular-js – Kevin Hakanson Mar 30 '13 at 02:51