From fe4e18131f35c535cf1a03e7a8149a53855455d9 Mon Sep 17 00:00:00 2001 From: aaronskiba Date: Thu, 23 Nov 2023 14:34:08 -0700 Subject: [PATCH] Config host with ENV (not secret) for development --- config/environments/development.rb | 5 ++--- config/secrets.yml | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/config/environments/development.rb b/config/environments/development.rb index 82fe64bb89..2cea199d1a 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -91,9 +91,8 @@ # This allows us to define the hostname and add it to the whitelist. If you attempt # to access the site and receive a 'Blocked host' error then you will need to # set this environment variable - config.hosts << Rails.application.secrets.dmproadmap_host if Rails.application.secrets.dmproadmap_host.present? -end + config.hosts << ENV.fetch('DMPROADMAP_HOST', 'localhost:3000') # rubocop:enable Metrics/BlockLength # Used by Rails' routes url_helpers (typically when including a link in an email) -Rails.application.routes.default_url_options[:host] = Rails.application.secrets.dmproadmap_host +Rails.application.routes.default_url_options[:host] = ENV.fetch('DMPROADMAP_HOST', 'localhost:3000') diff --git a/config/secrets.yml b/config/secrets.yml index e88573edb8..e5f4a7d8da 100755 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -45,7 +45,6 @@ development: database_url: <%= ENV['DATABASE_URL'] %> devise_pepper: <%= ENV['DEVISE_PEPPER'] %> devise_secret_key: <%= ENV['DEVISE_SECRET_KEY'] %> - dmproadmap_host: <%= ENV['DMPROADMAP_HOST'] || 'localhost:3000' %> dragonfly_secret: <%= ENV['DRAGONFLY_SECRET'] %> google_analytics_token: <%= ENV['GOOGLE_ANALYTICS_TOKEN'] %> mailer_default_host: <%= ENV['MAILER_DEFAULT_HOST'] || Socket.gethostname %>