DEV: support multiple hosts in dev

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

diff --git a/config/environments/development.rb b/config/environments/development.rb
index 306bd99..6c08004 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

GitHub sha: b282c893

1 Like