diff options
author | DJ Mountney <david@twkie.net> | 2016-04-01 15:04:03 -0700 |
---|---|---|
committer | DJ Mountney <david@twkie.net> | 2016-04-12 10:42:59 -0700 |
commit | 38cff18af0ed48bcd5916b6b6bb6ceeb9ab062fd (patch) | |
tree | 3cbc09ee1f3468204666808fc1e53ae25aa0012e /config | |
parent | 6f4b4fd901d854cf6d06dcdd91d98d0512a9ec39 (diff) | |
download | gitlab-ce-38cff18af0ed48bcd5916b6b6bb6ceeb9ab062fd.tar.gz |
Adjust the default trusted_proxies to only include localhost, and allow other trusted proxies to be configured.
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/1_settings.rb | 1 | ||||
-rw-r--r-- | config/initializers/trusted_proxies.rb | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index 72c4d8d61ce..2167da306f2 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -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'] ||= [] # diff --git a/config/initializers/trusted_proxies.rb b/config/initializers/trusted_proxies.rb new file mode 100644 index 00000000000..b8cc025bae2 --- /dev/null +++ b/config/initializers/trusted_proxies.rb @@ -0,0 +1,2 @@ +Rails.application.config.action_dispatch.trusted_proxies = + [ '127.0.0.1', '::1' ] + Array(Gitlab.config.gitlab.trusted_proxies) |