You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using React for the front-end running on 'http://localhost:3000' and Flask for the backend running on http://127.0.0.1:5000.
I am running into the following error Access to XMLHttpRequest at 'http://127.0.0.1:5000/manager/personnel' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.
I am using the following code to set up CORS:
Does this URL http://127.0.0.1:5000/manager/personnel exist on your backend app? Can you verify it's http://127.0.0.1:5000/manager/personnel without / at the end ?
I am using React for the front-end running on 'http://localhost:3000' and Flask for the backend running on http://127.0.0.1:5000.
I am running into the following error
Access to XMLHttpRequest at 'http://127.0.0.1:5000/manager/personnel' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.
I am using the following code to set up CORS:
I also tried using CORS at the blueprint level unsuccessfully.
What is most surprising is that some requests to the backend still succeed.
Someone had a similar issue on StackOverflow but never got a response: https://stackoverflow.com/questions/73665955/why-do-i-get-a-cors-error-with-react-axios-and-flask
The text was updated successfully, but these errors were encountered: