do not rely on hoptoad to insert rack ssl

This commit is contained in:
Jonne Haß 2012-01-22 18:42:06 +01:00
parent 872a96dc71
commit 98bdf68003
2 changed files with 9 additions and 1 deletions

View file

@ -1,4 +1,8 @@
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
if EnviromentConfiguration.enforce_ssl?
Rails.application.config.middleware.insert_before HoptoadNotifier::UserInformer, Rack::SSL
Rails.application.config.middleware.insert_before ActionDispatch::Cookies, Rack::SSL
puts "Rack::SSL is enabled"
end

View file

@ -1,3 +1,7 @@
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
module EnviromentConfiguration
def self.heroku?