Skip to content

Commit

Permalink
Add better handling of local allowed hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
Kagemaru committed Oct 18, 2022
1 parent 0e49356 commit 27fc1fe
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,13 @@
affiliate_id: ENV['ASPSMS_AFFILIATE_ID']
}

# Add allowed hosts and deduplicate them
hosts = ENV.fetch('RAILS_ALLOWED_HOSTS', '').split(',').map(&:strip)
host = ENV['RAILS_HOST']
config.hosts << host if host

config.hosts |= hosts if hosts.present?
config.hosts |= [host] if host.present?

# TODO Remove after fixing dev

config.log_level = :info

config.lograge.enabled = true
Expand Down

0 comments on commit 27fc1fe

Please sign in to comment.