title: How to proxy files from firewalled server through rails application
body: <p>I have a rails application running on Nginx which needs to serve files for download from another internal server.  The internal server uses a dynamic url to generate the file for download, so it isn't a static file sitting in a folder.  Both the rails server and server with the files are on the same LAN but only the rails server is open to the public on port 80.</p>
  
  <p>Additionally the files that I'm wanting to serve are anywhere from 5GB - 200GB so I don't want to tie up the rails process for the whole download if that is possible.  Is there a way to do this with Net::HTTP + send_data? Or perhaps some kind of Nginx proxy rule?</p>
  
  <p>From inside the LAN you can download a file with a url like this:</p>
  
  <pre><code>http://username:password@192.168.0.5/export?uuid=1234567890
  </code></pre>
  
  <p>The problem is 1) there is no access control for that url, with the user / pass you can download any file you want by passing in it's uuid parameter and 2) the server is only LAN accessible.  </p>