I have set up an API on a local virtual host using apache
, with my client running on another one.
While my AngularJS application works perfectly in Chrome
when device mode is turned off, I encounter an error when it's switched on:
angular.min.js:93 GET https://api.server.com 403 (Forbidden)
Below, I've included the relevant code snippet:
var storyFactory = angular.module('story.services', []);
storyFactory.factory('storyVideos', function ($http) {
var factory = {
story: {}
};
factory.getJSON = function (url, story_id) {
return $http.get(url + '/5727cce5cf3ad/story/get/' + story_id).then(function (response) {
return angular.extend(factory.story, response.data);
});
};
return factory;
});
I have ruled out any server-side issues as there are no errors and the server accepts Access-Control-Allow-Origin
.
I also attempted adding a manifest.json
to my index.html
, like this:
{
"permissions": [
"https://api.server.com/*"
]
}
Does anyone have insights into what might be causing this issue?
Thank you in advance.