I have a backend app, which is running on port 3000 on a remote server. There is another react app served on the same remote server on port 5000. I have exposed port 5000 by ufw allow 5000. When open the frontend app on the browser ip:5000, it can't send request to my backend apis. I get this error -
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:3001/v1/login. (Reason: CORS request did not succeed)
How do I solve this?