Forum: Ruby on Rails detecting protocol with proxy

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
parker (Guest)
on 2005-11-17 05:27
(Received via mailing list)

I'm trying to use apache to proxy requests through to one rails instance
(lighttpd) for both secure and insecure pages.  I want to do this by
applying filters (a nice 20 line solution) that look at the protocol and
redirect the user where appreciate (i.e. http://domain/login ->

When I try this the redirect happens...and happens...and happens; Apache
handles the https request, but rails decides that it's still a plain old
http request and redirects again.  What's interesting is that it gets
SERVER_NAME from apache (it's in the logs), so it's getting the URL but
not the protocol.

I understand that from rails' perspective this probably does look like
http request, it after all fields an http request even if apache is
securing the network connection.  Even so, any ideas on how to get
this?  How are other folks handling showing users secure pages for
like logins, password changes, viewing sensitive docs, etc and http for
everything else?


Parker T.
(c) 510.541.0125
This topic is locked and can not be replied to.