If you want to solve the Access-Control-Allow-Orgin header problems, you can setup the cors proxy. You can make your own cors proxy server or you can use online servers also.
You can easily setup your cors proxy server with these steps
- Clone the repository
-
Go to cors Folder
- Install the node modules
- Create the heroku server
- Push the code to heroku server
With this steps you can easily setup your cors proxy server and also deployed on the heroku server. After running these commands, your cors proxy server running at e.g https://cors-proxy-94862.herokuapp.com
Now add the proxy URL at the start of API URL in your application. E.g https://cors-proxy-94861.herokuapp.com/https://example.com. With this you can access your the third party api without cors issues.