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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2ca931e9e27524abe35c770b392bf989fbeef9fa314e411beb5863cbe565b013
4
- data.tar.gz: 1665611b78e7e35d8ccd25aefa51ed99d6758ac0d7a370dc116d533f6c52dc1a
3
+ metadata.gz: f997444c01f700674005254df0b27d7459b0c373658c34ff79b157769d376258
4
+ data.tar.gz: 8bd0e556ef46cbbc67cf36398285157df9113fd5570fea7bface6a3104aac052
5
5
  SHA512:
6
- metadata.gz: c952b34b519168cdcc7dd129863b935d9588c6f8d535778eb2d11b7555ea96b5a11aeb8fe4abd1cd8c2c230277944b1ec1104bbeb737c7c61e60feeca98eed4b
7
- data.tar.gz: 7d947fad93a6f8ac03434787b9aa1a258122915633217ece5c6db9b28e93d922f876069532f3d6da3aa4ef1b3e707b5d00e53e555543010d544d08bbf188169c
6
+ metadata.gz: 611f72a5a803d4e0f89f6b45b641181a36ba52d46ff11e3485429e97b12510f4af729cbfac0fe60ee26ae1434e9d9412d3b3f7668d9c68e295389dd36d559ade
7
+ data.tar.gz: f109d3c581828a297a330d99b7ecf0451506fd3fcb871d3d0b74aa6f2b240e2cbd94498a9487f9fd91b91d20ca2d9d904a3264ecc4f89bc5e6b103628ab7c857
data/.rubocop.yml CHANGED
@@ -32,3 +32,9 @@ Layout/CaseIndentation:
32
32
  Description: 'Indentation of when in a case/when/[else/]end.'
33
33
  StyleGuide: '#indent-when-to-case'
34
34
  Enabled: false
35
+
36
+ Metrics/CyclomaticComplexity:
37
+ Max: 32
38
+
39
+ Metrics/AbcSize:
40
+ Max: 32
@@ -3,7 +3,7 @@
3
3
  module Auth
4
4
  module Centric
5
5
  module Firewall
6
- VERSION = '0.0.8'
6
+ VERSION = '0.0.9'
7
7
  end
8
8
  end
9
9
  end
@@ -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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auth-centric-firewall
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Saimon Lovell