Skip to content

Commit

Permalink
Add an environment var, ENABLE_HTTPS, that when set to yes forces ssl
Browse files Browse the repository at this point in the history
  • Loading branch information
carols10cents committed Jul 22, 2012
1 parent 3ab6f8c commit 880183e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ class Application < Rails::Application
# Custom directories with classes and modules you want to be autoloadable.
config.autoload_paths += %W(lib)


# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
config.force_ssl = (ENV["ENABLE_HTTPS"] == "yes")

# Only load the plugins named here, in the order given (default is alphabetical).
# :all can be used as a placeholder for all plugins not explicitly named.
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
Expand Down

0 comments on commit 880183e

Please sign in to comment.