chore: use FRONTEND_URL_EXTERNAL env var as default url options host

This commit is contained in:
gabrieljablonski 2025-04-25 23:18:47 -03:00
parent a1d3d6befe
commit 34becba25f
3 changed files with 6 additions and 3 deletions

View File

@ -34,7 +34,8 @@ Rails.application.configure do
config.active_job.queue_adapter = :sidekiq
Rails.application.routes.default_url_options = { host: ENV['FRONTEND_URL'] }
host = ENV['FRONTEND_URL_EXTERNAL'].presence || ENV['FRONTEND_URL']
Rails.application.routes.default_url_options = { host: host }
# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log

View File

@ -102,5 +102,6 @@ Rails.application.configure do
# :sendgrid for Sendgrid
config.action_mailbox.ingress = ENV.fetch('RAILS_INBOUND_EMAIL_SERVICE', 'relay').to_sym
Rails.application.routes.default_url_options = { host: ENV['FRONTEND_URL'] }
host = ENV['FRONTEND_URL_EXTERNAL'].presence || ENV['FRONTEND_URL']
Rails.application.routes.default_url_options = { host: host }
end

View File

@ -50,7 +50,8 @@ Rails.application.configure do
# config.active_job.queue_adapter = :resque
# config.active_job.queue_name_prefix = "chatwoot_#{Rails.env}"
Rails.application.routes.default_url_options = { host: ENV['FRONTEND_URL'] }
host = ENV['FRONTEND_URL_EXTERNAL'].presence || ENV['FRONTEND_URL']
Rails.application.routes.default_url_options = { host: host }
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation cannot be found).