Hi , I have a angular app which is connecting to the rest api in the spring boot application. I have hosted both the application in the tomcat server which is installed in aws ec2 instance.
When i set up a base url with my ec2 instance public ip of the tomcat server everything works well. but the traffic between spring boot and angular slows down the application since all the traffic is flowing through internet. Since both the applications are hosted in the same server , i try to use local host in the base url of the angular app , but it fails to connect to the tomcat rest api. is there any solution for this kind of setup? tsproxy can solve this issue? kindly advise . thank you