Add SSL redirection
|Assignee:||Ohad Levy||% Done:|
|Velocity based estimate||-|
It should be possible to enable foreman on SSL ports.
however, kickstart (and maybe others) must work on port 80.
therefore, Foreman should be able to redirect the correct traffic to SSL ports when enabled.
#1 Updated by Frank Sweetser almost 4 years ago
http://agilewebdevelopment.com/plugins/ssl_requirement looks like a good fit. I'll play around with it and post any good results.
#3 Updated by Ohad Levy almost 4 years ago
I was actully thinking about something (that I think is ) simpliar - e.g. in the application control have:
def switch_to_https if request.host=~/localhost|127.0.0.1|test\.host|www.example.com/ return true else if request.protocol != 'https' and not request.ssl? redirect_to :protocol => 'https' end end true end
and then in each controller, where you don't want to force ssl, e.g. in the unattended controller:
before_filter :require_login, :switch_to_https, :except => :kickstart