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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 13 Oct 2007, at 03:31, knb wrote:> > 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. >IIRC you need to add RequestHeader set X_FORWARDED_PROTO ''https'' to your http config. Fred --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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. On Oct 13, 3:31 am, knb <kyleban...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Neil and Fred, Thank you. It worked perfectly! Kyle On Oct 13, 4:21 pm, Neil Wilson <aldur...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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. > > On Oct 13, 3:31 am, knb <kyleban...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > 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--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---