Добрый вечер! Не могу понять почему высвечивается ошибка:
Failed to load http://192.168.6786/api/account/signin: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. The response had HTTP status code 403.
Error: Network Error
at createError (createError.js:15)
at XMLHttpRequest.handleError (xhr.js:87)
Код прилагаю:
axios.post(apiBaseUrl + "account/signin", payload)
.then(function (response) {
console.log(response.data);
if(response.data.code == 200){
console.log("Login successfull");
window.location.href = "https://www.google.ru";
}
else if(response.data.code == 204){
console.log("Username password do not match");
alert(response.data.success);
}
else{
console.log("Username does not exists");
alert("Username does not exist");
}
})
.catch(function (error) {
console.log(error);
});