Adjust the default trusted_proxies to only include localhost, and allow other trusted proxies to be configured.

This commit is contained in:
DJ Mountney 2016-04-01 15:04:03 -07:00
parent 6f4b4fd901
commit 38cff18af0
2 changed files with 3 additions and 0 deletions

View file

@ -190,6 +190,7 @@ Settings.gitlab.default_projects_features['visibility_level'] = Settings.send
Settings.gitlab['repository_downloads_path'] = File.join(Settings.shared['path'], 'cache/archive') if Settings.gitlab['repository_downloads_path'].nil?
Settings.gitlab['restricted_signup_domains'] ||= []
Settings.gitlab['import_sources'] ||= ['github','bitbucket','gitlab','gitorious','google_code','fogbugz','git']
Settings.gitlab['trusted_proxies'] ||= []
#

View file

@ -0,0 +1,2 @@
Rails.application.config.action_dispatch.trusted_proxies =
[ '127.0.0.1', '::1' ] + Array(Gitlab.config.gitlab.trusted_proxies)