DEV Community

Anil
Anil

Posted on

Issue in fetching the data from server in React.

In react, if used proxy only fetches the data from server without any issue in development, but If directly hit on api endpoint then it gives cors issue of not allowed cors-header, Every thing works fine using APIdog, or POST man, But after building the react build (npm run build) for production mode the Proxy doesnot work. Doesn't fetches the data from the server, even doesnot hit to the server.

Top comments (0)