debian-mirror-gitlab/config/initializers/rails_host_authorization.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
594 B
Ruby
Raw Normal View History

2020-03-13 15:44:24 +05:30
# frozen_string_literal: true
# This file requires config/initializers/1_settings.rb
2021-04-17 20:07:23 +05:30
if Gitlab.config.gitlab.allowed_hosts.present?
Rails.application.config.hosts << Gitlab.config.gitlab.host << 'unix'
Rails.application.config.hosts += Gitlab.config.gitlab.allowed_hosts
end
2020-03-13 15:44:24 +05:30
if Rails.env.development?
2022-05-07 20:08:51 +05:30
Rails.application.config.hosts += [Gitlab.config.gitlab.host, 'unix', 'host.docker.internal', 'docker.for.mac.localhost']
2020-04-22 19:07:51 +05:30
if ENV['RAILS_HOSTS']
additional_hosts = ENV['RAILS_HOSTS'].split(',').select(&:presence)
Rails.application.config.hosts += additional_hosts
end
2020-03-13 15:44:24 +05:30
end