feed_us_grabber 0.1.12 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -88,8 +88,11 @@ class FeedUsGrabberController < ActionController::Base
|
|
88
88
|
end
|
89
89
|
|
90
90
|
if isPermitted == false
|
91
|
-
# Heroku fwd -> X-Forwarded-For
|
92
|
-
@mClientIp = request.env["
|
91
|
+
# Heroku fwd -> X-Forwarded-For, request.remote_addr would return proxy IP so now try fwd ip
|
92
|
+
@mClientIp = request.env["HTTP_X_FORWARDED_FOR"]
|
93
|
+
if @mClientIp == "" || @mClientIp.nil?
|
94
|
+
@mClientIp = request.env["X-Forwarded-For"]
|
95
|
+
end
|
93
96
|
isPermitted = IsClientIpInWhiteList()
|
94
97
|
puts "Trace: Try to use fwd header = #{@mClientIp}"
|
95
98
|
puts "Trace: using fwd header isPermitted = #{isPermitted}"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: feed_us_grabber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.13
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -124,7 +124,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
124
124
|
version: '0'
|
125
125
|
segments:
|
126
126
|
- 0
|
127
|
-
hash:
|
127
|
+
hash: 870045581
|
128
128
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
129
129
|
none: false
|
130
130
|
requirements:
|