Fixing the Error: “No ‘Access-Control-Allow-Origin’ header is present on the requested resource”

With the CORS Anywhere Node Module

Image for post
Image for post
Image for post
Image for post

What do you do when you have no control over the CORS policies of the backend server?

'Access-Control-Allow-Origin: *'

With cors-anywhere you can spin up your own proxy and resolve the error in just a few minutes.

Instructions for using cors-anywhere in a React.js app

Optional simplification for a development environment

Documenting JavaScript discoveries

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store