Rack & Ruby on Rails: Force SSL

Nowadays, your Web app likely needs security and encryption with SSL. Once your SSL certificate and Web server are set up, one good way to ensure SSL is used is to redirect all HTTP traffic to HTTPS.

In the world of Ruby, I’ll explain how to do it for any application running with Rack or anything built with Ruby on Rails. Your Ruby on Rails application is probably running on top of Rack anyway, so the odds are you just need one of the two methods below.… Continue reading “Rack & Ruby on Rails: Force SSL”