Commit f24e5a86c51dda58fea14419f02a96a78bc58e9a
1 parent
b936ce64
Exists in
master
and in
1 other branch
added rack-ssl-enforcer
Showing
3 changed files
with
7 additions
and
0 deletions
Show diff stats
Gemfile
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. | ... | ... |