From 45713f46dc7debf23f2781285ce42c93d948cef0 Mon Sep 17 00:00:00 2001 From: Eugene Burmakin Date: Sun, 20 Jul 2025 17:11:11 +0200 Subject: [PATCH] Fix domain in development and production --- config/environments/development.rb | 2 +- config/environments/production.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/environments/development.rb b/config/environments/development.rb index 68c0aeaa..c940de0e 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -88,7 +88,7 @@ Rails.application.configure do hosts = ENV.fetch('APPLICATION_HOSTS', 'localhost').split(',') - config.action_mailer.default_url_options = { host: ENV['SMTP_DOMAIN'] || hosts.first, port: ENV.fetch('PORT', 3000) } + config.action_mailer.default_url_options = { host: ENV['DOMAIN'] || hosts.first, port: ENV.fetch('PORT', 3000) } config.hosts.concat(hosts) if hosts.present? diff --git a/config/environments/production.rb b/config/environments/production.rb index 7207e549..1e4b392a 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -103,7 +103,7 @@ Rails.application.configure do config.host_authorization = { exclude: ->(request) { request.path == "/api/v1/health" } } hosts = ENV.fetch('APPLICATION_HOSTS', 'localhost').split(',') - config.action_mailer.default_url_options = { host: ENV['SMTP_DOMAIN'] } + config.action_mailer.default_url_options = { host: ENV['DOMAIN'] } config.hosts.concat(hosts) if hosts.present? config.action_mailer.delivery_method = :smtp