My rails app can not tell if it is on an SSL connection or not. I am using https:// as my protocol and then we I inspect request.ssl? it returns false. Any ideas why it would be doing this? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
You need to check that your webserver is making use of a specific environment variable that the request.ssl? makes use of Ben Johnson wrote:> My rails app can not tell if it is on an SSL connection or not. I am > using https:// as my protocol and then we I inspect request.ssl? it > returns false. Any ideas why it would be doing this?-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Scott A s wrote:> You need to check that your webserver is making use of a specific > environment variable that the request.ssl? makes use of > > > Ben Johnson wrote: >> My rails app can not tell if it is on an SSL connection or not. I am >> using https:// as my protocol and then we I inspect request.ssl? it >> returns false. Any ideas why it would be doing this?I''m u sing the latest apache with the mod_proxy_balancer and then mongrel. So nothing out of the ordinary. Do I need to turn on some options or something? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
the problem is that the SSL request arrives to the apache server, and not to the mongrel server ... the connection between apache and mongrel is not a SSL request ... On Sunday 02 September 2007 17:16:56 Ben Johnson wrote:> Scott A s wrote: > > You need to check that your webserver is making use of a specific > > environment variable that the request.ssl? makes use of > > > > Ben Johnson wrote: > >> My rails app can not tell if it is on an SSL connection or not. I am > >> using https:// as my protocol and then we I inspect request.ssl? it > >> returns false. Any ideas why it would be doing this? > > I''m u sing the latest apache with the mod_proxy_balancer and then > mongrel. So nothing out of the ordinary. Do I need to turn on some > options or something?-- Rodrigo Urubatan Ferreira Jardim rodrigo-nmTMUhUik5w39yzSjRtAkw@public.gmane.org http://www.urubatan.com.br http://www.techoffice.com.br --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Rodrigo Urubatan Ferreira Jardim wrote:> the problem is that the SSL request arrives to the apache server, and > not to > the mongrel server ... > the connection between apache and mongrel is not a SSL request ... > > On Sunday 02 September 2007 17:16:56 Ben Johnson wrote: >> mongrel. So nothing out of the ordinary. Do I need to turn on some >> options or something? > > > > -- > Rodrigo Urubatan Ferreira Jardim > rodrigo-nmTMUhUik5w39yzSjRtAkw@public.gmane.org > http://www.urubatan.com.br > http://www.techoffice.com.brI think I found a solution. In my virtual host for my ssl connection I put: RequestHeader set X_FORWARDED_PROTO ''https'' This way the ssl? method works fine in rails. Kind of feels like a hack, but not really. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---