-
-
Notifications
You must be signed in to change notification settings - Fork 530
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enforce SSL in production environment
This setting has been on for every thoughtbot Rails app I've touched in the past year or two (maybe a dozen?). * Use `configure_environment` helper method more consistently. * Fixes #781 More about the pervasiveness of SSL in our ecosystem: https://blog.heroku.com/announcing_heroku_free_ssl_beta_and_flexible_dyno_hours https://letsencrypt.org/
- Loading branch information
Showing
6 changed files
with
22 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
require "rails/generators" | ||
require_relative "../actions" | ||
|
||
module Suspenders | ||
class EnforceSslGenerator < Rails::Generators::Base | ||
include Suspenders::Actions | ||
|
||
def enforce_ssl | ||
configure_environment "production", "config.force_ssl = true" | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters