Как мне отправить запрос api на сайт если мешает CORS
Подскажите пожалуйста как мне отправить запрос api на сайт если мешает CORS. Сайт предоставляет открытый api.
Код:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<script src="jquery-3.7.0.min.js"></script>
<script>
function test() {
$.ajax({
url: 'https://api.dellin.ru/v3/auth/login.json',
method: 'POST',
dataType: 'json',
data: {
appkey: 'xxxxxxxx-xxxx-xxxx-xxxx-7B57046BAB5F',
login: '[email protected]',
password: 'xxxxxxxx'},
success: function (data) {
alert(data);
}
});
};
test();
</script>
</body>
</html>
Ошибка: Access to XMLHttpRequest at 'https://api.dellin.ru/v3/auth/login.json' from origin 'http://127.0.0.1:5500' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.