Open filippodicostanzo opened 3 years ago
@filippodicostanzo You should use the proxy options of axios
Check this https://stackoverflow.com/q/60943279/10900851
"Options - Axios Module" https://axios.nuxtjs.org/options/#proxy
This happens to me. No fix in sight, these nuxt module off-shoots are terribly maintained. Proxy is not even a logical fix for this issue, I'm never using nuxt on a project again. Back to inertiajs for me I guess.
I trying to make a POST call to external service with axios to a external service and the response is this:
Access to XMLHttpRequest at 'https://reqbin.com/echo/post/json' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I'm developing on localhost:3000.
This is the code of post method
If I try to get a call it works.
Also if I try the post call with POSTMAN everything works.
Do you have any suggestions? I also configured the config.json file under axios in this way but it still doesn't work