There are several solutions to correct the Axios CORS error that prohibits multiple origins:
Add the desired origins to the Access-Control-Allow-Origin header of the server-side response.
Use a reverse proxy server like nginx or Apache to forward requests to the server with the correct headers.
Use a CORS proxy like CORS Anywhere to send requests through a different domain to avoid the CORS issue.
Use JSONP or a similar technique to bypass the CORS restriction.
Modify the browser's security settings to allow requests from different origins.
Use a different API that doesn't have the CORS restriction.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2021-06-09 11:00:00 +0000
Seen: 11 times
Last updated: Jul 29 '21
Is the Django server not receiving the anticipated cookie header in the Axios request?
How to send API requests to a different docker container, using NextJS and NodeJS?
How can the Axios and React JS error code of 400 (Bad Request) be explained and handled?
How can tables be updated using axios in Vue/Vuetify 3 while using imported data-returning methods?
How can I allow GraphQL access from other origins using CORS settings?