From fb8cac75ffd8f3e39a05487b228b50d7c4c1b1c0 Mon Sep 17 00:00:00 2001 From: Ryan Wold <64987852+ryanwoldatwork@users.noreply.github.com> Date: Thu, 27 Mar 2025 12:30:34 -0700 Subject: [PATCH] support a second host --- config/environments/development.rb | 2 -- config/environments/production.rb | 3 +++ config/environments/staging.rb | 7 +++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/config/environments/development.rb b/config/environments/development.rb index e079179ec..d78d60285 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -58,8 +58,6 @@ # Set localhost to be used by links generated in mailer templates. config.action_mailer.default_url_options = { host: "localhost", port: 3000 } - # TODO: For temporary redirect (March 2025) - config.action_controller.default_url_options = { host: "localhost", port: 3000 } # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log diff --git a/config/environments/production.rb b/config/environments/production.rb index 28520e55e..7878928ea 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -113,6 +113,9 @@ config.hosts = [ ENV.fetch("TOUCHPOINTS_WEB_DOMAIN") ] + if ENV["TOUCHPOINTS_WEB_DOMAIN2"].present? + config.hosts << ENV.fetch("TOUCHPOINTS_WEB_DOMAIN2") + end # Skip DNS rebinding protection for the default health check endpoint. # config.host_authorization = { exclude: ->(request) { request.path == "/up" } } end diff --git a/config/environments/staging.rb b/config/environments/staging.rb index 5a07a9037..1c1ca0422 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -116,4 +116,11 @@ config.active_record.encryption.deterministic_key = ENV.fetch("RAILS_ACTIVE_RECORD_DETERMINISTIC_KEY") config.active_record.encryption.key_derivation_salt = ENV.fetch("RAILS_ACTIVE_RECORD_KEY_DERIVATION_SALT") config.active_record.encryption.support_unencrypted_data = true + + config.hosts = [ + ENV.fetch("TOUCHPOINTS_WEB_DOMAIN") + ] + if ENV["TOUCHPOINTS_WEB_DOMAIN2"].present? + config.hosts << ENV.fetch("TOUCHPOINTS_WEB_DOMAIN2") + end end