HTTP Integration not set-up for reverse proxy using traefik

Hello,

I’m having issues to use Home Assistant running on Docker and using Traefik as reverse proxy.
when I hit the URL defined on Traefik I get an 400: Bad Request error and looking the HASS log I see:

2022-01-09 11:19:59 ERROR (MainThread) [homeassistant.components.http.forwarded] A request from a reverse proxy was received from 172.18.0.4, but your HTTP integration is not set-up for reverse proxies

On the configuration.yaml for home assistant I’ve the following parameters for the HTTP:

http:
use_x_forwarded_for: true
trusted_proxies:
- 172.18.0.0/27 # Internal docker network subnet
- 127.0.0.1

Any idea what could be wrong?

Did you confirm traefik actually sends “x-forwarded-for”?
Lots of results searching those terms…

mmm not sure how check that, currently this is the config i’ve for HASS

homeassistant:
image: homeassistant/home-assistant:2021.12
container_name: homeassistant
restart: unless-stopped
volumes:
- ${DOCKER_FILE_DIR}/docker/homeassistant:/config
- /etc/localtime:/etc/localtime:ro
- ${DOCKER_FILE_DIR}/homeassistant/shared:/shared
- ${ZIGBEE_USB_SERIAL}:${ZIGBEE_USB_SERIAL}
ports:
- “8123:8123”
networks:
- lan-traefik
devices:
- ${ZIGBEE_USB}:${ZIGBEE_USB}
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TIMEZONE}
labels:
- “traefik.enable=true”
- “traefik.http.routers.homeassistant-https.entrypoints=websecure”
- “traefik.http.routers.homeassistant-https.rule=Host(homeassistant.${BASE_DOMAIN})”
- “traefik.http.routers.homeassistant-https.service=homeassistant”
- “traefik.http.routers.homeassistant.tls=true”
- “traefik.http.routers.homeassistant-https.tls.certresolver=http”>
- “traefik.docker.network=lan-traefik”
- “traefik.frontend.whiteList.useXForwardedFor=true”
- “traefik.http.services.homeassistant.loadbalancer.server.port=8123”
- “com.centurylinklabs.watchtower.enable=true”