Hello everyone, I have a REACT application that uses POST requests to communicate with a service in my application. For example, the following request is sent from the browser.
POST https://xyz.app.pantaris.io/r2mm/STOP_APP
With the following docker compose file (shortend to focus):
...
rest2mqtt-mapper:
build:
context: .
dockerfile: rest2mqtt-mapper/Dockerfile
ports:
- 8080:80
ui:
build:
context: .
dockerfile: ui/Dockerfile
ports:
- 3000:3000
labels:
- "com.calponia.networking.0.host=ui"
- "com.calponia.networking.0.port=3000"
- "com.calponia.networking.1.host=rest2mqtt-mapper"
- "com.calponia.networking.1.port=80"
- "com.calponia.networking.1.match.0.uri.prefix=/r2mm/"
- "com.calponia.networking.1.match.0.ignoreUriCase=true"
- "com.calponia.networking.1.rewrite.uri=/"
...
I was hoping that the request would be forwarded as follows.
http://rest2mqtt-mapper/STOP_APP
With Istio / Virtual Service I was not able to solve the problem.
Unfortunately, it seems that nothing is reaching the container. Instead, the browser receives a 404 error from istio. Any idea what I am doing wrong?
So far the UI is working fine with the exception that it cannot communicate with the backend.
Thank you for your help.