This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
Hi all. I'm building an app using React & Django and I've run into the dreaded CORS error. What's worse is all the tutorials I can find are more than happy to explain what CORS is and the security reasons for why it exists, but not how to actually solve the problem in a way I can understand it!
What I mean is: I want to make a request using axios to a domain outside my webserver. This causes the CORS error, I get that. So, I'm expected to use my backend server to "proxy the request," but what does that actually mean?
Do I pass the URL of the API I want to request to my backend, use django (or, really, any backend service for those who don't use django) to make the request itself, then pass the result back to React? Is that the process? Or is there some other step-by-step approach I'm supposed to take?
Any help would be appreciated. Thanks!!
Post Details
- Posted
- 2 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/reactjs/com...