(continuation of error message in title) \" Origin \'http://127.0.0.1:4200\' is therefore not allowed access.\"
I am unable to run the same Angular 5 site on two dif
Setup a reverse proxy server and configure paths for both the domains.
Nginx Guide
This will allow you to access everything via http://localhost/
Let's assume:
A -> Angular App (localhost:4200)
B -> Your other domain API (myapitest.local)
Example Flow:
- Browser Request(http://localhost/angular) -> Nginx -> A
- Load Data from backend -> Nginx -> B
So, with the help of Nginx, you will be able to access "A" from http://localhost/
and "B" also from http://localhost/
Since, the origin is same, there will be no CORS error.