- Is http://noembed.com/embed your Laravel API?
- Which domain is throwing you the CORS error?
Oct 20, 2020
3
Level 7
Laravel CORS and accessing an external endpoint
I am using Laravel as an api backend and Nuxt js for frontend. I installed fruitcake/laravel-cors package to manage CORS. Now I need to make a GET request to an external resource (https://noembed.com) and I am getting a CORS errors: CORS request external redirect not allowed CORS preflight response did not succeed CORS request did not succeed
My request:
this.$axios.get('http://noembed.com/embed?url=' + url).then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
Do I need to change something in my Cors config in Laravel? Or do I need to add headers to my axios request?
Please or to participate in this conversation.