0

i have a react app create with create-react-app. i want to send request to another url:

fetch('anotherUrl')
        .then(response => response.json())
        .then(res => console.log(res))

After that i've a cors problem. How to set middleware to null this error?

1 Answers1

0

You can use browser addon to turn off cors. After you finish developing your app and put it online, cors won't be a problem. It is only problem when you run app in localhost.

Lazar Nikolic
  • 4,261
  • 1
  • 22
  • 46