auth-centric-firewall 0.0.8 → 0.0.9
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.
- checksums.yaml +4 -4
- data/.rubocop.yml +6 -0
- data/lib/auth/centric/firewall/version.rb +1 -1
- data/lib/auth/centric/firewall.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: f997444c01f700674005254df0b27d7459b0c373658c34ff79b157769d376258
|
4
|
+
data.tar.gz: 8bd0e556ef46cbbc67cf36398285157df9113fd5570fea7bface6a3104aac052
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 611f72a5a803d4e0f89f6b45b641181a36ba52d46ff11e3485429e97b12510f4af729cbfac0fe60ee26ae1434e9d9412d3b3f7668d9c68e295389dd36d559ade
|
7
|
+
data.tar.gz: f109d3c581828a297a330d99b7ecf0451506fd3fcb871d3d0b74aa6f2b240e2cbd94498a9487f9fd91b91d20ca2d9d904a3264ecc4f89bc5e6b103628ab7c857
|
data/.rubocop.yml
CHANGED
@@ -34,11 +34,11 @@ module Auth
|
|
34
34
|
true
|
35
35
|
end
|
36
36
|
|
37
|
-
def valid_ip?(request)
|
37
|
+
def valid_ip?(request, forced: false)
|
38
38
|
return true unless enabled?
|
39
39
|
|
40
40
|
ip_address = request.env['HTTP_X_FORWARDED_FOR'] || request.remote_ip
|
41
|
-
return true if IGNORE_IP.include?(ip_address)
|
41
|
+
return true if !forced && IGNORE_IP.include?(ip_address)
|
42
42
|
|
43
43
|
http = HTTP
|
44
44
|
.timeout(timeout_seconds)
|