diff --git a/config/environments/development.rb b/config/environments/development.rb index 764e618..4153699 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -75,4 +75,8 @@ Rails.application.configure do } # config.file_watcher = ActiveSupport::EventedFileUpdateChecker + + # Any action dealing with authentication should redirect to HTTPS + config.to_prepare { Devise::SessionsController.force_ssl(port: 3001) } + end diff --git a/config/environments/production.rb b/config/environments/production.rb index 69624d8..b81a232 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -106,4 +106,6 @@ Rails.application.configure do small: '160x120', } + # Any action dealing with authentication should redirect to HTTPS + config.to_prepare { Devise::SessionsController.force_ssl } end