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
This commit is contained in:
Sam Saffron 2019-09-17 16:01:39 +10:00
parent 445d305154
commit b282c893b2

View File

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