Open maxfrischknecht opened 3 years ago
I also had a similar problem when using the @nuxtjs/axios v5.13.1 version of the module, in conjunction with nuxt v2.15.3. I haven't found a solution to this problem yet.
@Stormiks Did you find any workaround? Or did you just swop the axios module?
Running on
The Axios Config:
The following call works (from a page/component):
While the following call in
store/index.js
doesn't:The error in the console is the following:
CORS Preflight Did Not Succeed
. It responds with a Status of404 Not Found
and the following error messageCross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at MYAPI. (Reason: CORS preflight response did not succeed).
On my server all the necessary headers are set. And it seems to be a problem caused by Axios because when calling from the component it works and only after trying to call the API from the store produces a problem.
Did anyone happen to run into this issue and found a solution?