I have following line in my package.json (react app)
"proxy": "http://www.demoapp.com"
I'm requesting data using REST-API call
axios.post('/user_data', { // http://www.demoapp.com/user_data
id:id
})
.then((response) => {
console.log(response);
})
.catch((error) => {
});
Above code works fine if I use it in my local system, But if I build a project and upload into hosting server proxy doesn't work.
Anyone know the solution? I have checked in github also but not found proper solution.