programming

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

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.

 

Cool Dev

Recent Posts

Setup Tailwind CSS with Angular 11

Install tailwind css with npm Run the following command to install tailwind css npm install…

1 year ago

How to setup laravel project using homestead

Step 1 : Create a new directory Homestead by using this command  cd ~/Homestead Step…

1 year ago

NPM vs NPX

npx and npm are both command line tools that are used to install and run…

1 year ago

Configure laravel project in vagrant box in ubuntu

Step 1: Create a directory where you want to store project such as  mkdir ~/vagrant_projects…

1 year ago

Guide To Naming Conventions

Specifically, there are certain naming conventions available across all programming languages, also known as Snake…

1 year ago

React Native Hybrid with Ease

React Native Hybrid: Is React native hybrid? a popular question that mostly developers asked. Let…

2 years ago

This website uses cookies.