title: traefik docker x-forwarded-for loop
body: <p>I am having issues using docker + rancher + traefik. </p>
  
  <p>The backends are discovered well and it works with 2 rancher hosts. But from time to time when hitting the my websites hosted in the traefik backend, I have docker that does a lot of io wait and the traefik logs shedding logs like:</p>
  
  <pre><code>my-internal-proxy-2     | 2018-02-06T15:03:15.500664406Z time="2018-02-06T15:03:15Z" level=debug msg="vulcand/oxy/forward: begin ServeHttp on request" Request="{"Method":"GET","URL":{"Scheme":"http","Opaque":"","User":null,"Host":":80","Path":"","RawPath":"","ForceQuery":false,"RawQuery":"","Fragment":""},"Proto":"HTTP/1.1","ProtoMajor":1,"ProtoMinor":1,"Header":{"Accept":["*/*"],"Accept-Encoding":["gzip"],"User-Agent":["curl/7.47.0"],"X-Forwarded-For":["public.ip.xx, 10.4.2.116, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1, 127.0.0.1....
  </code></pre>
  
  <p>Why I am getting this? it crashed everyday and cannot figureout why x-forwarded-for is 127.0.0.1. any ideas?</p>
  
  <p>thanks</p>