Answer the question
In order to leave comments, you need to log in
Is there any way to bypass CORS without a proxy?
Hello.
The browser forbids the js script to take content from json from another server.
What to do?
(Script on Git Pages so don't raise the proxy)
Answer the question
In order to leave comments, you need to log in
Cors-proxy to use, example for JQUERY
$.ajax({
type:'POST',
url: 'https://cors-anywhere.herokuapp.com/http://************.ru/api/',
data: {
query: '{"ask":"'+message+'","userid":'+id+',"key":"1"}'
},
success: function(data){
msg = JSON.parse(data);
$(".messages").append('<li><div class="text-msg receive_msg">'+msg['aiml']+'</div></li>');
while($(".messages li").length > 7){
$('li:first').detach();
}
}
});
It is forbidden.
You can use public proxies (google, they are), but I would not
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question