Answer the question
In order to leave comments, you need to log in
Why throws Cors Laravel + Nuxt error?
when accessed from Nuxt axios
that.$axios
.$post('/v1/media/upload', formData, {
headers: { 'Content-Type': 'multipart/form-data' },
})
.then((response: any) => {
that.form.path = response.path
that.form.image = response.image
})
.catch((error) => {
console.log(error)
})
Access to XMLHttpRequest at 'http://site.test:8000/api/v1/media/upload' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question