You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Am trying to serve built react code and connect to a nodejs server. I have serve running on port 5000 and node backend on port 8080. I have enabled cors on the node server, and it works fine with the default react server that runs on port 3000 when you create a react app. But when I build the react app and serve the front end code with the serve module, the browser throws the error that 'Cross-Origin Request Blocked:...'. I have tried adding options by running the following commands but it wont work.
serve --cors -s build
serve -C -s build
Anyone with an idea how to enable cors in this module?
The text was updated successfully, but these errors were encountered:
Am trying to serve built react code and connect to a nodejs server. I have
serve
running on port 5000 andnode
backend on port 8080. I have enabled cors on the node server, and it works fine with the default react server that runs on port 3000 when you create a react app. But when I build the react app and serve the front end code with theserve
module, the browser throws the error that 'Cross-Origin Request Blocked:...'. I have tried adding options by running the following commands but it wont work.serve --cors -s build
serve -C -s build
Anyone with an idea how to enable cors in this module?
The text was updated successfully, but these errors were encountered: