0
I’m trying to get the G1 RSS which comes in XML but error No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.
follows the code:
$.ajax({
url: "http://pox.globo.com/rss/g1/brasil/",
dataType: 'xml',
success: function (data) {}
});
I’ve researched several places, tried to add headers but if successful, how can I solve?
@Bacco unfortunately I cannot solve with that answer
– Lennon S. Bueno
Place
crossDomain: true
in your AJAX did not work?– Artur Trapp
@Arturotemplário put and it was not
– Lennon S. Bueno
Access-Control-Allow-Credentials: true, But if you want a good tip look at https://www.html5rocks.com/en/tutorials/cors/ and see the part with Jquery request.
– Panda