Closed maciejgos closed 5 years ago
Why do you need to communicate directly with product-service? You should go via existing api-gateway which already handles CORS or create a new one dedicated for you client app.
When I open web app and go to Products page the web app throws CORS exception on http://localhost. This is the reason why I add CORS policy.
VUEJS app calls below URL's so it looks as it calls them directly not thru the gateway VUE_APP_BACKEND_URL=http://localhost:8081/api/ VUE_APP_AUTH_URL=http://localhost:6060/api VUE_APP_CHAT_URL=http://localhost:4099
No it is not. You need to properly setup things in your .env file.
VUE_APP_BACKEND_URL=http://localhost:8099/ VUE_APP_AUTH_URL=http://localhost:6060/ VUE_APP_CHAT_URL=http://localhost:4099
I check agent gateway on master branch and it looks that on docker-compose branch .UseUrls("http://localhost:8099")
is missing in Program.cs. I will merge master into docker-compose and go further with my changes.
Dockerization work is indeed performed on docker-compose branch, we will proceed with dockerization on master once we upgrade tp .netcore3, as we are not 100% happy with the way things look like on docker-compose branch. As said previously - CORS is not needed for ProductService as it should not be accessed directly, so please remove it from pull request. Change of network mode is ok, but we need to expose ports properly so eureka registration will work
Yes I already remove CORS changes and start to play around with gateway & eureka
Closed to remove CORS from ProductService
Change network mode to bridge to allow host containers on macOS and Windows machines. Currently host network mode is only available on Linux hosts.
I add also CORS policy to allow communication on localhost with VUEJS website.