So I've got a basic custom GET in angular using $resource
angular.module('myApp')
.factory('MyService', function($resource){
return $resrouce('some url',
{},
{
list: {method:'GET', params:{}}
});
});
I then use it like this
MyService.list().$promise.then(function(data){
//do something
});
When I use it in Chrome (33) it works. In firefox (10.0.2) however I get a
401 unauthorized
If I go to the url directly within firefox I get the data.
The service and my page are hosted on different boxes. I wondered if it's got something to do with cross site protection or something? Any thoughts?
EDIT: I've tried enabling CORS as per this answer but again no help.
EDIT2: the 401 response has no body. The headers are pretty basic...
HTTP/1.1: 401 Unauthorized
Server: Apache-Coyote/1.1
Pragma: No-cache
Cache-Control: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 UTC
Content-Length: 1174
Date: Tue, 14 Jul 2015 08:52:16 GMT