We had a problem after building our Vuejs application.
We did not any problem with the API service. We can connect with Postman and we can do any transactions.
The project will run on the apache. After the build, we move the files in dist to /var/www/htdocs
We cannot send any requests to the API service. (Client-side). If I wrote localhost or 127.0.0.1, API services don’t work on the client-side. The users can’t log in, can not perform any transactions. Even though both sides working on the same device If I wrote server IP address the axios.default.baseURL.
I think the client computers can not finding/reaching localhost or 127.0.0.1 addresses on their computer.
This project running on the intranet. Maybe there will be no internet connection on this server. I think we should be able to write localhost or 127.0.0.1 on the axios.default.baseURL
We will manually enter the server IP address for the project we are doing, but what should we do to avoid this problem in the future?
Thanks for helping.