I am able to make a cross-origin request after using a chrome extension but I want to make requests without using the extension.
$http.get(URL+"?id="+$scope.source, {headers:{'Access-Control-Allow-Origin': '*'}}).then(function(response) {
some function.....
})
when I don't use the extension I get the following error and I have changed the url in error, it was showing the url to which I am making the request
XMLHttpRequest cannot load http://100.100.100.100:100. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.