From b282c893b20e5f8b5a6b5f31c96f436b7976603e Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Tue, 17 Sep 2019 16:01:39 +1000 Subject: [PATCH] DEV: support multiple hosts in dev This renames the DISCOURSE_ENV_HOST var @eviltrout introduced in 95a9a544 to DISCOURSE_ENV_HOSTS and allows for a comma delimited list of hosts This is useful for testing plugins and customized host names --- config/environments/development.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/environments/development.rb b/config/environments/development.rb index 306bd99f25b..6c080046d7a 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -41,7 +41,9 @@ Discourse::Application.configure do BetterErrors::Middleware.allow_ip! ENV['TRUSTED_IP'] if ENV['TRUSTED_IP'] config.load_mini_profiler = true - config.hosts << ENV['DISCOURSE_DEV_HOST'] if ENV['DISCOURSE_DEV_HOST'] + if hosts = ENV['DISCOURSE_DEV_HOSTS'] + config.hosts.concat(hosts.split(",")) + end require 'middleware/turbo_dev' config.middleware.insert 0, Middleware::TurboDev