Skip to content

Commit c3cf9b4

Browse files
support a second host
2 parents 936f713 + fb8cac7 commit c3cf9b4

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

config/environments/development.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@
5858

5959
# Set localhost to be used by links generated in mailer templates.
6060
config.action_mailer.default_url_options = { host: "localhost", port: 3000 }
61-
# TODO: For temporary redirect (March 2025)
62-
config.action_controller.default_url_options = { host: "localhost", port: 3000 }
6361

6462
# Print deprecation notices to the Rails logger.
6563
config.active_support.deprecation = :log

config/environments/production.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@
113113
config.hosts = [
114114
ENV.fetch("TOUCHPOINTS_WEB_DOMAIN")
115115
]
116+
if ENV["TOUCHPOINTS_WEB_DOMAIN2"].present?
117+
config.hosts << ENV.fetch("TOUCHPOINTS_WEB_DOMAIN2")
118+
end
116119
# Skip DNS rebinding protection for the default health check endpoint.
117120
# config.host_authorization = { exclude: ->(request) { request.path == "/up" } }
118121
end

config/environments/staging.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,11 @@
116116
config.active_record.encryption.deterministic_key = ENV.fetch("RAILS_ACTIVE_RECORD_DETERMINISTIC_KEY")
117117
config.active_record.encryption.key_derivation_salt = ENV.fetch("RAILS_ACTIVE_RECORD_KEY_DERIVATION_SALT")
118118
config.active_record.encryption.support_unencrypted_data = true
119+
120+
config.hosts = [
121+
ENV.fetch("TOUCHPOINTS_WEB_DOMAIN")
122+
]
123+
if ENV["TOUCHPOINTS_WEB_DOMAIN2"].present?
124+
config.hosts << ENV.fetch("TOUCHPOINTS_WEB_DOMAIN2")
125+
end
119126
end

0 commit comments

Comments
 (0)