Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at


#1

Hello
I am getting error

"NetworkError: 400 Bad Request - http://myapi/accounts/login"
login

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://api.datadudu.com/accounts/login. (Reason: CORS header ‘Access-Control-Allow-Origin’ does not match ‘*’).

$http({
url: “http://api.datadudu.com/accounts/login”,
data: { username: loginData.username, password: loginData.password },
headers: {
Accept: “/”,
},
method: ‘POST’,
withCredentials: true,
}).success(function (data,textStatus,jqXHR) {
if (data.message == “success”) {
deferred.resolve(data);
}
else {
deferred.resolve(0);
}
}).error(function (err) {
deferred.resolve(0);
})
return deferred.promise;
}

Anybody help me out