gitlab-org--gitlab-foss/lib/gitlab/middleware
Stan Hu 01203e7188 Fix health checks not working behind load balancers
The change in
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24199 caused
requests coming from a load balancer to arrive as 127.0.0.1 instead of
the actual IP.

`Rack::Request#ip` behaves slightly differently different than
`ActionDispatch::Request#remote_ip`: the former will return the first
X-Forwarded-For IP if all of the IPs are trusted proxies, while the
second one filters out all proxies and falls back to REMOTE_ADDR, which
is 127.0.0.1.

For now, we can revert back to using `Rack::Request` because these
middlewares don't manipulate parameters. The actual fix problem involves
fixing Rails: https://github.com/rails/rails/issues/28436.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/58573
2019-03-12 12:46:40 -07:00
..
read_only Bang up predicate methods and use #internal_route? 2019-01-16 19:14:46 +11:00
basic_health_check.rb Fix health checks not working behind load balancers 2019-03-12 12:46:40 -07:00
correlation_id.rb Remove rails4 specific code 2018-12-16 10:48:41 +01:00
go.rb Enable the Layout/ExtraSpacing cop 2019-01-24 13:05:45 +01:00
multipart.rb Fix multipart attachments not uploading 2019-01-05 01:56:47 -08:00
rails_queue_duration.rb Log queue duration in production_json.log 2019-02-12 06:58:55 -08:00
read_only.rb Enable even more frozen string for lib/gitlab 2018-11-16 17:41:14 -08:00
release_env.rb Enable even more frozen string for lib/gitlab 2018-11-16 17:41:14 -08:00
static.rb Enable even more frozen string for lib/gitlab 2018-11-16 17:41:14 -08:00