Docker Community Forums

Share and learn in the Docker community.

Container send post request to another container

I have 2 containers on the same network. The first Container has port 3000 exposed and is the UI. When it communicates with the api on another container, nothing happens. Nothing is returned.

If i were to access the api from the exposed external port 4000, it works.

I want the containers to communicate on the same network.

If i inspect the network request from the browser:

Request URL:

Request method:OPTIONS

Referrer Policy:no-referrer-when-downgrade

I have tried replacing the ip address with the container name, still nothing. This would only work if i change the ip address to localhost:4000

Can anyone help or point me in the right direction?


Could this be a cors issue