Forgive me if this isn’t 100% rails, but I’m trying to get
ssl_requirement to work and it sends my app into an infinite loop
because @request.ssl? is always returning false, even if I’m using
For some reason, my @request isn’t getting any SSL info: neither
@request.ssl? nor @request.env[“HTTPS”] return true.
I’m using pound/mongrel with a trial certificate from verisign. I’m
Thanks in advance,
Further inspection: whether I’m at http://mysite.com or
https://mysite.com I still get the following:
@request.port --> 80
@request.protocol --> http://
@request.ssl --> false
What gives? Server setup?
What sort of deployment are you using ? If you have apache proxying to a
bunch of mongrels for example then (because the actual bit in between
apache and mongrel isn’t SSL) then you need to do something like
RequestHeader set X_FORWARDED_PROTO ‘https’
in your apache conf so that this information gets as far as the mongrel.
My host provider is saying this: "Unfortunately with Apache 1.x it is
not possible to pass the header using the proxy directive, you would
also have to pass the header from pound to mongrel. "
Are there any other suggestions for how I can detect if the user is
using an SSL connection?
That’s what I suspected… Thanks Fred I’ll talk to my host provider.
I’m not used to not having 100% control over my environment.