rack-delegate 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b827bc57057bfb1f8d44c1d4587e0722e99d1be8
4
- data.tar.gz: 20866a6684f0dc06f29e04d1e3f00b3fe6e2c996
2
+ SHA256:
3
+ metadata.gz: 6a2899f8fb58c64175fba6690b4125c48713fa4f02457f82c1e15f06c2fbf1b9
4
+ data.tar.gz: cce81334f5e26ac2c9c0fcab3a6d7c902731ee0e9d93638aeb5d886edc6b6353
5
5
  SHA512:
6
- metadata.gz: ca86c524f8a984abd632894bd24a9e76770414e4a0f374abb0bf332b00e949c5eb959122a82bd0bdbb6b5b7e2cd3b75812709d93aaff6af35d7a4f083900111c
7
- data.tar.gz: 70fd9e5e260893a0b5482b6c3b53d11d0e7c97c2ac60810aa4d6c481344132dc4051047b4afca8c57b355e8599198ddf819a9757dfb93645a1f1a6d6d6e5cf74
6
+ metadata.gz: 9a497c92094dcc352045d399b09ba26175f0c9f1c114667b5441667b0b0c74a4c83e588c5f4838c28c48056fd041d79766912876c07aaa343d5a554613a3db72
7
+ data.tar.gz: e1f6a00be4069a220c4b4ffb55cde4ac0bc45ddbea3a26b6e24fb0fb6649389812f7a8e637980e23521153b6a3c943316f2b95892e1ba9d5fc31b17e963ba975
@@ -26,7 +26,7 @@ module Rack
26
26
  private
27
27
 
28
28
  def net_http_options
29
- [@url.host, @url.port, https: @url.scheme == 'https']
29
+ [@url.host, @url.port, use_ssl: @url.scheme == 'https']
30
30
  end
31
31
 
32
32
  def convert_to_rack_response(http_response)
@@ -8,6 +8,11 @@ module Rack
8
8
  CONTENT_TYPE
9
9
  ).freeze
10
10
 
11
+ IGNORED_HEADERS = %w(
12
+ HTTP_HOST
13
+ HTTP_CONNECTION
14
+ ).freeze
15
+
11
16
  def build
12
17
  net_http_request_class.new(url).tap do |net_http_request|
13
18
  delegate_rack_headers_to(net_http_request)
@@ -52,6 +57,7 @@ module Rack
52
57
  def headers_from_rack_request(rack_request)
53
58
  rack_request.env
54
59
  .select { |key, _| key.start_with?('HTTP_') || CONTENT_HEADERS.include?(key) }
60
+ .reject { |key, _| IGNORED_HEADERS.include?(key) }
55
61
  .collect { |key, value| [key.sub(/^HTTP_/, '').tr('_', '-'), value] }
56
62
  end
57
63
  end
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  module Delegate
3
- VERSION = "0.4.0"
3
+ VERSION = "0.5.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-delegate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genadi Samokovarov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-10 00:00:00.000000000 Z
11
+ date: 2019-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -86,8 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
86
  - !ruby/object:Gem::Version
87
87
  version: '0'
88
88
  requirements: []
89
- rubyforge_project:
90
- rubygems_version: 2.5.1
89
+ rubygems_version: 3.0.3
91
90
  signing_key:
92
91
  specification_version: 4
93
92
  summary: Rack level reverse proxy.