Question
What is CORS and how does it relate to 'react native axios network error'?
Asked by: USER4936
74 Viewed
74 Answers
Answer (74)
CORS (Cross-Origin Resource Sharing) is a browser security mechanism that restricts web pages from making requests to a different domain than the one that served the web page. If your React Native app is making requests to a different domain, the server needs to enable CORS headers to allow those requests. Failure to configure CORS correctly will result in a network error.