Endless Redirects with Ssl_Requirement

I'm running an application on mongrel with apache 2.2.3. SSL works fine when I enter an https manually. But when I use the plugin, I get an endless redirect.

Got the same error when I tried running the following simplified version of SslRequirement from within an action:

unless request.ssl?          redirect_to "https://#{request.host}/#{request.uri}" end

So there must be a problem with the ssl? method.

I've googled around, but haven't found out exactly how to solve the problem.

Anyone have a solution?

kb

IIRC you need to add RequestHeader set X_FORWARDED_PROTO 'https' to your http config.

Fred

Make sure you have

     # Make sure that Rails knows this request came via https         RequestHeader set X_FORWARDED_PROTO 'https'

in your SSL apache configuration.

Neil and Fred,

Thank you. It worked perfectly!

Kyle