I have an Angular 4 app, and I want it to point to a different URL for the backend (which is a java/spring app). When I had this problem on my localhost (it not being able to connect to my locally stood up backend) - I fixed it by adding this proxy.conf.json code (specifically the /api and /auth):
{
"/api/*": {
"target": "http://[::1]:8080",
"secure": false
},
"/auth/*": {
"target": "http://[::1]:8080",
"secure": false
},
"*": {
"target": "http://localhost:8080",
"secure": false,
"loglevel": "debug"
}
}
I now want to test this by pulling against my backend stoodup as a pod in a Rancher environment. I try to have it point to the right backend code via the below changes:
{
"/api/*": {
"target": "https://fake-app1.my-fake-url.com",
"secure": false
},
"/auth/*": {
"target": "https://fake-app1.my-fake-url.com",
"secure": false
},
"*": {
"target": "https://fake-app1.my-fake-url.com",
"secure": false,
"loglevel": "debug"
}
}
But when I look at the browser console it still shows up as going to localhost:8080 for API calls. Do I need to change anything else?
Change this in webpack.dev.js: SERVER_API_URL:
""`