include Rack::SSL to upgrade all requests to ssl
This commit is contained in:
parent
ff615848ca
commit
18e895c247
3 changed files with 7 additions and 0 deletions
1
Gemfile
1
Gemfile
|
|
@ -32,6 +32,7 @@ group :production do # we don't install these on travis to speed up test runs
|
||||||
gem 'newrelic_rpm'
|
gem 'newrelic_rpm'
|
||||||
gem 'rack-google-analytics', :require => 'rack/google-analytics'
|
gem 'rack-google-analytics', :require => 'rack/google-analytics'
|
||||||
gem 'rack-piwik', :require => 'rack/piwik'
|
gem 'rack-piwik', :require => 'rack/piwik'
|
||||||
|
gem 'rack-ssl', :require => 'rack/ssl'
|
||||||
end
|
end
|
||||||
|
|
||||||
# configuration
|
# configuration
|
||||||
|
|
|
||||||
|
|
@ -293,6 +293,8 @@ GEM
|
||||||
rack-mount (0.6.14)
|
rack-mount (0.6.14)
|
||||||
rack (>= 1.0.0)
|
rack (>= 1.0.0)
|
||||||
rack-piwik (0.1.2)
|
rack-piwik (0.1.2)
|
||||||
|
rack-ssl (1.3.2)
|
||||||
|
rack
|
||||||
rack-test (0.5.7)
|
rack-test (0.5.7)
|
||||||
rack (>= 1.0)
|
rack (>= 1.0)
|
||||||
rails (3.0.11)
|
rails (3.0.11)
|
||||||
|
|
@ -473,6 +475,7 @@ DEPENDENCIES
|
||||||
pg
|
pg
|
||||||
rack-google-analytics
|
rack-google-analytics
|
||||||
rack-piwik
|
rack-piwik
|
||||||
|
rack-ssl
|
||||||
rails (= 3.0.11)
|
rails (= 3.0.11)
|
||||||
rails-i18n
|
rails-i18n
|
||||||
redcarpet (= 2.0.1)
|
redcarpet (= 2.0.1)
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,9 @@ Diaspora::Application.configure do
|
||||||
# In production, Apache or nginx will already do this
|
# In production, Apache or nginx will already do this
|
||||||
config.serve_static_assets = false
|
config.serve_static_assets = false
|
||||||
|
|
||||||
|
#force ssl in production
|
||||||
|
config.middleware.insert_before ActionDispatch::Static, "Rack::SSL"
|
||||||
|
|
||||||
# Enable serving of images, stylesheets, and javascripts from an asset server
|
# Enable serving of images, stylesheets, and javascripts from an asset server
|
||||||
# config.action_controller.asset_host = "http://assets.example.com"
|
# config.action_controller.asset_host = "http://assets.example.com"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue