Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

How to proxy pages through Rails (See related posts)

class DefaultController < ApplicationController
    def default
        result = Net::HTTP.get_response(
            "realserver.internal.net",
            @request.env["REQUEST_URI"]
            )
        #render error if result. ...
        render_text result.body
        end
    end

You need to create an account or log in to post comments to this site.


Click here to browse all 4861 code snippets

Related Posts