class ImagesController < ApplicationController
# relays remote images so that we can encrypt them
data = open(params[:src])
:type => data.content_type,
:disposition => 'inline'
Here is how to proxy an image from an HTTP server to a client using ruby on rails. This is useful when trying to proxy a request from an insecure server when your server is hosted over SSL.