wafris 0.3.3 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lua/dist/wafris_core.lua +2 -3
- data/lib/wafris/version.rb +1 -1
- data/lib/wafris.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5b39cabfbc682a8747543a828ed6f4247391510133775eccddc5b993a8aba71
|
4
|
+
data.tar.gz: 8e1b9ed6f5f28142a7b2f9573ed08c08d3289ec6426b90b4295327900cdd0eaf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e23d9df1014a335af26d8ccc44eece11276ba603903b7bcb21c9912459b2371bead29ed29c083c442a202f05307e4de74a821093338236cfca33cd48c77eb8f1
|
7
|
+
data.tar.gz: 10209a6b297681ef18b400db8e3101e4b2f44d21e08760bbb10e9928d67a1d64660f586fbf3a060565532b4417c68fc2aabdae7f4b74f164b1ffcfc4075a1bc5
|
@@ -89,10 +89,9 @@ add_to_HLL_request_count(current_timebucket, request_id)
|
|
89
89
|
-- LEADERBOARD DATA COLLECTION
|
90
90
|
-- TODO: breaking change will to switch to client_ip: prefix
|
91
91
|
increment_timebucket_for(nil, current_timebucket, client_ip)
|
92
|
-
if proxy_ip ~= nil then
|
93
|
-
increment_timebucket_for(
|
92
|
+
if proxy_ip ~= nil and proxy_ip ~= "" then
|
93
|
+
increment_timebucket_for("proxy_ip:", current_timebucket, proxy_ip)
|
94
94
|
end
|
95
|
-
increment_timebucket_for("proxy_ip:", current_timebucket, proxy_ip)
|
96
95
|
increment_timebucket_for("user_agent:", current_timebucket, user_agent)
|
97
96
|
increment_timebucket_for("request_path:", current_timebucket, request_path)
|
98
97
|
increment_timebucket_for("host:", current_timebucket, host)
|
data/lib/wafris/version.rb
CHANGED
data/lib/wafris.rb
CHANGED
@@ -61,13 +61,13 @@ module Wafris
|
|
61
61
|
def client_ip(request)
|
62
62
|
return request.ip if request.get_header(Rack::Request::HTTP_X_FORWARDED_FOR).nil?
|
63
63
|
|
64
|
-
request.get_header
|
64
|
+
request.get_header(Rack::Request::HTTP_X_FORWARDED_FOR).split(',').first
|
65
65
|
end
|
66
66
|
|
67
67
|
def proxy_ip(request)
|
68
68
|
return nil if request.get_header(Rack::Request::HTTP_X_FORWARDED_FOR).nil?
|
69
69
|
|
70
|
-
request.get_header
|
70
|
+
request.get_header(Rack::Request::HTTP_X_FORWARDED_FOR).split(',').last
|
71
71
|
end
|
72
72
|
end
|
73
73
|
end
|