0.0
No commit activity in last 3 years
No release in over 3 years
Routing-level ssl support for ruby application actions
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 0
 Project Readme

SecureRoutes¶ ↑

Warning! Proof of concept.¶ ↑

Secure routes is routing-level support for ssl in your rails 3 application.

Installation¶ ↑

To install simply add this to your Gemfile:

gem 'secure_routes'

Then you need to enable secure routing in your environment config:

config.action_dispatch.secure_routes = true

Usage¶ ↑

If you want your action to force https protocol, add this to routes:

match 'login' => 'sessions#new', :secure => true

Or

scope :secure => true do
  match 'login' => 'sessions#new'
end

And if you’ll try to access host.com/login then you’ll be redirected to host.com/login

To force http protocol, just set :secure => false. Redirection rules works here too. If protocol is unnesesary - don’t set :secure option.

You can setup secure actions usage with:

config.action_dispatch.secure_routes = true

in your environment. It is false by default. So you can use securing for production only.

To spec it just clone repo, then:

bundle && rake spec