From d3ea150130bd1b9bb774a083283e6bbd1820e235 Mon Sep 17 00:00:00 2001 From: Eugene Burmakin Date: Mon, 8 Jul 2024 23:02:11 +0200 Subject: [PATCH] Set default value for APPLICATION_HOSTS environment variable to string --- CHANGELOG.md | 2 -- config/environments/development.rb | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cbc8a3f5..611f9c5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [0.8.4] — 2024-07-08 - - ### Added - Support for multiple hosts. Now you can specify the host of the application by setting the `APPLICATION_HOSTS` (note plural form) environment variable in the `docker-compose.yml` file. Example: diff --git a/config/environments/development.rb b/config/environments/development.rb index e262c8e0..2d3c3884 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -78,7 +78,7 @@ Rails.application.configure do config.action_mailer.default_url_options = { host: ENV.fetch('APPLICATION_HOST', 'localhost'), port: 3000 } config.hosts << ENV.fetch('APPLICATION_HOST', 'localhost') - hosts = ENV.fetch("APPLICATION_HOSTS", ['localhost']) + hosts = ENV.fetch('APPLICATION_HOSTS', 'localhost') config.hosts.concat(hosts.split(',')) if hosts.present? config.force_ssl = ENV.fetch('APPLICATION_PROTOCOL', 'http').downcase == 'https'