400: Bad Request Error with an container application in 8125 port

Hi there.

I’m trying to configure a cloudflared tunnel with all my applications installed in containers, but when I do this, I can’t access the instances, with error 400:

Captura de Tela 2023-07-13 às 16.58.28

Here is my docker compose file configuration:

version: '3.0'
services:
  portainer:
    container_name: portainer
    image: portainer/portainer-ce
    restart: always
    ports:
      - "9000:9000/tcp"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /opt/portainer:/data
  ezmart-starter-8124:
    container_name: ezmart-starter-8124
    image: ghcr.io/home-assistant/home-assistant:stable
    restart: unless-stopped
    volumes:
      - /ezmart-starter/ezmart-starter-8124/.ezmart-starter-8124/config:/config
      - /etc/localtime-8124:/etc/localtime-8124:ro
    #network_mode: host
    ports:
      - 8124:8123
    privileged: true
  ezmart-starter-8125:
    container_name: ezmart-starter-8125
    image: ghcr.io/home-assistant/home-assistant:stable
    restart: unless-stopped
    volumes:
      - /ezmart-starter/ezmart-starter-8125/.ezmart-starter-8125/config:/config
      - /etc/localtime-8125:/etc/localtime-8125:ro
    #network_mode: host
    ports:
      - 8125:8123
    privileged: true

And here is my zero trust config:

ingress:
  - hostname: ezmart-starter-8124-standard.themodernhouse.com.br
    service: http://51.222.22.192:8124
  - hostname: ezmart-starter-8125.themodernhouse.com.br
    service: http://51.222.22.192:8125
  - service: http_status:404

Can someone help me?

I’m really getting crazy with it…

Thanks in advance!

Found the issue: Cloudflared container was running outside the host network, after changing this it started working like a charm.