Webfaction and ssl_requirement

SSL_requirement plugin does weird things on webfaction, because theydo not set X_FORWARDED_PROTO but rather set X_FORWARDED_SSL in the apache config.  It is an easy fix, just find this line in your /vendor/rails/actionpack/lib/action_controller/request.rb

@env[’HTTPS’] == ‘on’ || @env[’HTTP_X_FORWARDED_PROTO’] == ‘https’

and add this to the end of it

|| @env[’HTTP_X_FORWARDED_SSL’] == ‘on’

The crazy behavior that this fixes is that the page will return this “The page isn’t redirecting properly: Firefox has detected that the server is redirecting the request for this address in a way that will never complete. *   This problem can sometimes be caused by disabling or refusing to accept cookies. “

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • Technorati

Leave a Reply