tl;dr If you need to read the client IP in your applications/stacks using the X-Forwarded-For or X-Real-IP headers provided by Traefik, you need to make Traefik listen directly, not through Docker Swarm mode, even while being deployed with Docker Swarm mode.
I swear one day we will actually aggregate our logs and this will become useful...
Fun read at: https://dockerswarm.rocks/traefik/#getting-the-client-ip
tl;dr If you need to read the client IP in your applications/stacks using the X-Forwarded-For or X-Real-IP headers provided by Traefik, you need to make Traefik listen directly, not through Docker Swarm mode, even while being deployed with Docker Swarm mode.
I swear one day we will actually aggregate our logs and this will become useful...