Commit f24e5a86c51dda58fea14419f02a96a78bc58e9a

Authored by Dean Perry
1 parent b936ce64
Exists in master and in 1 other branch production

added rack-ssl-enforcer

Showing 3 changed files with 7 additions and 0 deletions   Show diff stats
Gemfile
... ... @@ -20,6 +20,8 @@ gem 'hoptoad_notifier', "~> 2.4"
20 20 gem 'actionmailer_inline_css', "~> 1.3.0"
21 21 gem 'kaminari'
22 22  
  23 +gem 'rack-ssl-enforcer', :group => :production
  24 +
23 25 platform :ruby do
24 26 gem 'mongo', '= 1.3.1'
25 27 gem 'bson', '= 1.3.1'
... ...
Gemfile.lock
... ... @@ -134,6 +134,7 @@ GEM
134 134 rack (1.2.4)
135 135 rack-mount (0.6.14)
136 136 rack (>= 1.0.0)
  137 + rack-ssl-enforcer (0.2.4)
137 138 rack-test (0.5.7)
138 139 rack (>= 1.0)
139 140 rails (3.0.10)
... ... @@ -234,6 +235,7 @@ DEPENDENCIES
234 235 octokit
235 236 oruen_redmine_client
236 237 pivotal-tracker
  238 + rack-ssl-enforcer
237 239 rails (= 3.0.10)
238 240 ri_cal
239 241 rspec (~> 2.6)
... ...
config/application.rb
... ... @@ -15,6 +15,9 @@ Bundler.require(:default, Rails.env) if defined?(Bundler)
15 15  
16 16 module Errbit
17 17 class Application < Rails::Application
  18 +
  19 + config.middleware.use Rack::SslEnforcer, :except => /^\/deploys/
  20 +
18 21 # Settings in config/environments/* take precedence over those specified here.
19 22 # Application configuration should go into files in config/initializers
20 23 # -- all .rb files in that directory are automatically loaded.
... ...