Reverse Proxy Fix 1.0.5.0 released

Posted by Brian in News, Products, Rails (March 7th, 2008)

The reverse_proxy_fix plugin allows a Rails application to live behind a proxy like the one provided by HeliconTech’s ISAPI_Rewrite plugin as outlined in Deploying Rails Applications. It allows you to configure the base URL that will be prepended to any URL generated by the Rails link_to method and friends. This is useful if you want to force all requests through a frontend or if you want to graft your Rails application onto an existing IIS URL scheme.

This release fixes an issue with named routes and Rails 2.0. Previous versions of the plugin did not support rewriting of named routes in Rails 2.0 due to the optimization code for named routes. This version of the plugin disables the optimizations.

Installation

Installation is simple:

  ruby script/plugin install http://svn.napcsweb.com/public/reverse_proxy_fix

Then provide your base URL, which is the URL you want prepended to all of your URLs. For example, if you are trying to mount your Rails application at http://www.mydomain.com/myapp, you’d enter that as your base URL.

Next you need to specify which version of Rails you are using.

Comments are welcome, and so are patches if you see something that doesn’t make sense.

5 Responses to ' Reverse Proxy Fix 1.0.5.0 released '

Subscribe to comments with RSS or TrackBack to ' Reverse Proxy Fix 1.0.5.0 released '.

  1. Brian Candler said,
    on March 18th, 2008 at 3:31 am

    Just a few notes:

    (1) In your posting, svn.napcs.com should be svn.napcsweb.com ?

    (2) install.rb appears to be Windows-specific – under Linux it borks.

    $ script/plugin install http://svn.napcsweb.com/public/reverse_proxy_fix

    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require’: no such file to load — FileUtils (LoadError)
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require’
    from /home/candlerb/svn/dev/projects/deploy2/trunk/vendor/plugins/reverse_proxy_fix/install.rb:5

    The fix is simple:
    [ edited for space by Brian Hogan – fix integrated into the svn repository ]
    (3) The README file still says “REVERSE PROXY PLUGIN v1.04.1 (December 17th, 2007)”, so either the svn repository hasn’t updated, or the README file wasn’t updated for the new release

  2. Brian said,
    on March 25th, 2008 at 4:55 am

    @Brian Candler
    Wow. Thanks for those. This last release was really rushed out. I’ve taken your feedback and rolled it into the plugin.

  3. Christian Mornard said,
    on April 11th, 2008 at 4:02 am

    I think this plugin is awesome ! Saved me from insanity at least, when I tried to deploy my application behind Apache 2 reverse proxy. There is still one thing I can’t solve though: I use FCKEditor Plugin in my app and the links produced by the fckeditor_helper are not fixed by Reverse Proxy (no clue why). Any idea on how to fix this?
    Thanks again for your great work !! :grin:

  4. Brian said,
    on April 23rd, 2008 at 4:18 am

    @Christian:

    Have you checked the options for the helper? We use TinyMCE on a lot of our projects and that has the ability to change how URLs work. I’m sure there’s a solution as I’ve used FCK with some projects without issue as well. If I find the solution I’ll post it in the blog.

  5. Jim said,
    on May 19th, 2008 at 6:11 am

    Thanks for building this, Brian. It’s not working for me. We’ve been using it with success with isapi_rewrite but ever since our upgrade to rails 2 (including this release of reverse_proxy_fix) it’s been broken.

Leave a reply

:mrgreen: :neutral: :twisted: :shock: :smile: :???: :cool: :evil: :grin: :oops: :razz: :roll: :wink: :cry: :eek: :lol: :mad: :sad: