Skip to content

How to use a CORS proxy to avoid “No Access-Control-Allow-Origin header” problems

  • by

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.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

I accept that my given data and my IP address is sent to a server in the USA only for the purpose of spam prevention through the Akismet program.More information on Akismet and GDPR.