Skip to content

Commit

Permalink
Bump rack gem to 2.0.7
Browse files Browse the repository at this point in the history
This update has two important fixes:

1. It reverts the monkey patch introduced in
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/23385 since
rack/rack#1201 is now part of the release.

2. Preserve forwarded IP address for trusted proxy chains
(rack/rack#1343).
  • Loading branch information
stanhu committed Apr 5, 2019
1 parent b54228a commit 617dcfd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
5 changes: 1 addition & 4 deletions Gemfile
Expand Up @@ -139,10 +139,7 @@ gem 'icalendar'
gem 'diffy', '~> 3.1.0'

# Application server
# The 2.0.6 version of rack requires monkeypatch to be present in
# `config.ru`. This can be removed once a new update for Rack
# is available that contains https://github.com/rack/rack/pull/1201.
gem 'rack', '2.0.6'
gem 'rack', '~> 2.0.7'

group :unicorn do
gem 'unicorn', '~> 5.4.1'
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Expand Up @@ -617,7 +617,7 @@ GEM
puma (>= 2.7, < 4)
pyu-ruby-sasl (0.0.3.3)
raabro (1.1.6)
rack (2.0.6)
rack (2.0.7)
rack-accept (0.4.5)
rack (>= 0.4)
rack-attack (4.4.1)
Expand Down Expand Up @@ -1100,7 +1100,7 @@ DEPENDENCIES
pry-rails (~> 0.3.4)
puma (~> 3.12)
puma_worker_killer
rack (= 2.0.6)
rack (~> 2.0.7)
rack-attack (~> 4.4.1)
rack-cors (~> 1.0.0)
rack-oauth2 (~> 1.9.3)
Expand Down
4 changes: 0 additions & 4 deletions config.ru
Expand Up @@ -13,10 +13,6 @@ if defined?(Unicorn)
# Max memory size (RSS) per worker
use Unicorn::WorkerKiller::Oom, min, max
end

# Monkey patch for fixing Rack 2.0.6 bug:
# https://gitlab.com/gitlab-org/gitlab-ee/issues/8539
Unicorn::StreamInput.send(:public, :eof?) # rubocop:disable GitlabSecurity/PublicSend
end

require ::File.expand_path('../config/environment', __FILE__)
Expand Down

0 comments on commit 617dcfd

Please sign in to comment.