proxy 1.3.3 → 1.3.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +3 -0
- data/lib/proxy/action_controller/abstract_request.rb +6 -1
- metadata +12 -5
data/CHANGELOG
CHANGED
@@ -20,7 +20,12 @@ module Proxy
|
|
20
20
|
#
|
21
21
|
# Returns an empty array if there aren't any forwarded hosts
|
22
22
|
def forwarded_hosts
|
23
|
-
env['HTTP_X_FORWARDED_HOST'].to_s.split(/,\s*/)
|
23
|
+
hosts = env['HTTP_X_FORWARDED_HOST'].to_s.split(/,\s*/)
|
24
|
+
unless hosts.empty? || hosts.first != hosts.last
|
25
|
+
hosts[hosts.size - 1] = env['HTTP_HOST']
|
26
|
+
env['HTTP_X_FORWARDED_HOST'] = hosts.join(', ')
|
27
|
+
end
|
28
|
+
hosts
|
24
29
|
end
|
25
30
|
|
26
31
|
# Parses the forwarded uri header and returns an array of forwarded uris
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: proxy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 1
|
7
|
+
- 3
|
8
|
+
- 4
|
9
|
+
version: 1.3.4
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Sean Huber
|
@@ -9,7 +14,7 @@ autorequire:
|
|
9
14
|
bindir: bin
|
10
15
|
cert_chain: []
|
11
16
|
|
12
|
-
date: 2010-
|
17
|
+
date: 2010-05-03 00:00:00 -07:00
|
13
18
|
default_executable:
|
14
19
|
dependencies: []
|
15
20
|
|
@@ -50,18 +55,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
50
55
|
requirements:
|
51
56
|
- - ">="
|
52
57
|
- !ruby/object:Gem::Version
|
58
|
+
segments:
|
59
|
+
- 0
|
53
60
|
version: "0"
|
54
|
-
version:
|
55
61
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
56
62
|
requirements:
|
57
63
|
- - ">="
|
58
64
|
- !ruby/object:Gem::Version
|
65
|
+
segments:
|
66
|
+
- 0
|
59
67
|
version: "0"
|
60
|
-
version:
|
61
68
|
requirements: []
|
62
69
|
|
63
70
|
rubyforge_project:
|
64
|
-
rubygems_version: 1.3.
|
71
|
+
rubygems_version: 1.3.6
|
65
72
|
signing_key:
|
66
73
|
specification_version: 3
|
67
74
|
summary: A gem/plugin that allows rails applications to respond to multiple domains and proxied requests
|