title: Method to get the client ip address
body: <p>I'm developing an application where it seems likely that people will attempt to hide what their client IP address is behind a proxy server. </p>
  
  <p>Is there a unified way to get what the actual client IP Address is behind the proxy? Looking at the <a href="http://api.rubyonrails.org/classes/ActionController/Request.html#M000706" rel="nofollow noreferrer">Ruby docs</a>, it explicitly states that </p>
  
  <pre><code>request.remote_ip
  </code></pre>
  
  <p>and</p>
  
  <pre><code>request.remote_addr
  </code></pre>
  
  <p>both would return the proxy address and not the actual client IP and I'm thrown by the "may contain" descriptions in the rest of the HTTP headers. </p>