Angular app talking to multiple microservices using Cookie authentication on ajax requests. Cookies are not passed over cross domain ajax requests, so we need to be able to have the Angular app and microservices running on same-domain in local dev as well as in production.
We have a Docker nginx proxy running on localhost:8000
:
- proxying to multiple microservices on
localhost:8000/api/<microservice>
- proxying other requests to Angular CLI (ng serve) on
en0 inet (192.168.1.5 for instance)
port4200
- using a python script to get the correct
en0
IP and write it to the nginx config at proxy startup