I have problems with cross domains in a development environment with a webpack-dev server running on port 8080, while the express server is running on port 5000.
- The backend api method invokes CORS errors through AJAX
- By clicking on the link pointing to the backend, api does not transfer session data
These problems are solvable, but I wonder why bother if they don't happen in production (where both clients and the backend will use the same port)
Is it possible to solve this problem (for example, by running a dev server and expressing it on the same port or in any other way?)
source
share