Maintenance - We're currently working on things and you might experience some issues. Should be wrapped up soon!

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.

7
Understanding CORS solution
Post Flair (click to view more posts with a particular flair)
Post Body

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!!

Author
Account Strength
100%
Account Age
12 years
Verified Email
Yes
Verified Flair
No
Total Karma
44,423
Link Karma
2,405
Comment Karma
41,821
Profile updated: 5 days ago
Posts updated: 7 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
2 years ago