I was trying to get client IP with request.client.host, and followed the documentation on https://dockerswarm.rocks/traefik-v1/traefik/#getting-the-client-ip, but it does not seem to work.
From the log, I'm still getting
INFO:uvicorn.access:10.0.5.18:40570 - "GET /api/v1/users/33 HTTP/1.1" 200
The output from logger.info(request.client.host) has the same result 10.0.5.18, this should be the IP traefik assigned internally, not the expected client IP.
Is there anything I'm missing to configure?
I was trying to get client IP with
request.client.host, and followed the documentation on https://dockerswarm.rocks/traefik-v1/traefik/#getting-the-client-ip, but it does not seem to work.From the log, I'm still getting
The output from
logger.info(request.client.host)has the same result10.0.5.18, this should be the IPtraefikassigned internally, not the expected client IP.Is there anything I'm missing to configure?