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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 6a2899f8fb58c64175fba6690b4125c48713fa4f02457f82c1e15f06c2fbf1b9
|
4
|
+
data.tar.gz: cce81334f5e26ac2c9c0fcab3a6d7c902731ee0e9d93638aeb5d886edc6b6353
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a497c92094dcc352045d399b09ba26175f0c9f1c114667b5441667b0b0c74a4c83e588c5f4838c28c48056fd041d79766912876c07aaa343d5a554613a3db72
|
7
|
+
data.tar.gz: e1f6a00be4069a220c4b4ffb55cde4ac0bc45ddbea3a26b6e24fb0fb6649389812f7a8e637980e23521153b6a3c943316f2b95892e1ba9d5fc31b17e963ba975
|
@@ -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
|
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
|
+
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:
|
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
|
-
|
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.
|