diff --git a/config/environments/development.rb b/config/environments/development.rb index 557000065..3cbd93679 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -34,7 +34,7 @@ Rails.application.configure do config.active_job.queue_adapter = :sidekiq - Rails.application.routes.default_url_options = { host: ENV['FRONTEND_URL'] } + Rails.application.routes.default_url_options = { host: ENV['FRONTEND_URL'].to_s.chomp('/') } # 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 a9504fc5c..283827963 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -102,5 +102,5 @@ 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'] } + Rails.application.routes.default_url_options = { host: ENV['FRONTEND_URL'].to_s.chomp('/') } end diff --git a/config/environments/staging.rb b/config/environments/staging.rb index ed7cc0e84..ca56de545 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -50,7 +50,7 @@ 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'] } + Rails.application.routes.default_url_options = { host: ENV['FRONTEND_URL'].to_s.chomp('/') } # Enable locale fallbacks for I18n (makes lookups for any locale fall back to # the I18n.default_locale when a translation cannot be found).