title: Difference between X-Forwarded-For and X-Real-IP headers
body: <p>I'm using Nginx as a reverse proxy.</p>
  <p>What is the difference between these headers:</p>
  <pre class="lang-ini prettyprint-override"><code>proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_set_header X-Real-IP       $remote_addr;
  </code></pre>
  <p>In some documents/tutorials I see both are used, in others only the first.</p>
  <p>They seem similar, so I'd like to understand how they differ and whether I need to use both at the same time.</p>