Set default value for APPLICATION_HOSTS environment variable to string

This commit is contained in:
Eugene Burmakin 2024-07-08 23:02:11 +02:00
parent 427231ab70
commit d3ea150130
2 changed files with 1 additions and 3 deletions

View file

@ -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:

View file

@ -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'