Hello! Cross domain requests doesn’t work with rechat.twitch.tv
subdomain. If I send an ajax request, for example:
$.ajax({
url: 'https://rechat.twitch.tv/rechat-messages?start=1496526536&video_id=v149218977',
crossDomain: true,
dataType: 'json',
success: function (data) {
console.log(data);
}
});
I get an error:
XMLHttpRequest cannot load https://rechat.twitch.tv/rechat-messages?start=1496526536&video_id=v149218977. The 'Access-Control-Allow-Origin' header has a value 'http://www.twitch.tv' that is not equal to the supplied origin. Origin 'http://localhost:3000' is therefore not allowed access.
Please, tell me what is wrong?