From 5b16353938fc3886068c8c5cf48d310b5aeb14a1 Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Wed, 7 Nov 2018 11:22:24 +0000 Subject: [PATCH] Specify only link protocol setting --- config/environments/production.rb | 3 +++ config/environments/staging.rb | 3 +++ config/initializers/action_mailer.rb | 6 ------ 3 files changed, 6 insertions(+), 6 deletions(-) delete mode 100644 config/initializers/action_mailer.rb diff --git a/config/environments/production.rb b/config/environments/production.rb index 229221e118..3d7803772d 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -30,6 +30,9 @@ Openfoodnetwork::Application.configure do # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. config.force_ssl = true + # Use https in email links + config.action_mailer.default_url_options = { protocol: 'https' } + # See everything in the log (default is :info) config.log_level = :info diff --git a/config/environments/staging.rb b/config/environments/staging.rb index 303d7d2913..b0e1b96301 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -30,6 +30,9 @@ Openfoodnetwork::Application.configure do # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. config.force_ssl = true + # Use https in email links + config.action_mailer.default_url_options = { protocol: 'https' } + # See everything in the log (default is :info) # config.log_level = :debug diff --git a/config/initializers/action_mailer.rb b/config/initializers/action_mailer.rb deleted file mode 100644 index cd2a638567..0000000000 --- a/config/initializers/action_mailer.rb +++ /dev/null @@ -1,6 +0,0 @@ -ActionMailer::Base.configure do |config| - if Rails.env.production? || Rails.env.staging? - # Use https when creating links in emails - config.default_url_options = { protocol: 'https', host: Spree::Config[:site_url] } - end -end