I have a React app that connects to a database through flask. The particular page I'm using is a "register user" type page. When I enter the info and click register, in the console I get the red CORS errors triggered. Yet, when I check the database, the data I submitted ends up there. I thought if I have a CORS error, nothing is talking to each other. On a high level, what is happening here?
Asked
Active
Viewed 68 times
-2
-
1have you checked the network tab in your browsers developer tools? See which request got flagged. – Sep 15 '21 at 04:17
-
@CallumMorrisson I did! It doesn't give me a status code, it does say `CORS Missing Allow Origin` though – filifunk Sep 15 '21 at 04:19
-
So looking at it again it looks like I get a 500 code once then three other identical `CORS Missing Allow Origin` errors – filifunk Sep 15 '21 at 04:24
1 Answers
0
You need to add cors to your flask app as your react app is running on local server, once you add cors your backend can work on any hosts .

jeevandza
- 3
- 2