darjeelink 0.14.3 → 0.14.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0f395d01b733415c7836867132dd888ac5f5dcd567a338e8d1d845d5e12a952
|
4
|
+
data.tar.gz: fdf3c1b4f775a88169adacd74ae43529a00c1ae16f05df0e7f904226ae95d6e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67c05cf3fab55ab937a75a511d55f231aef131b21fbb9baabcae3ba0819014346532e91d321b1674231e9bdce32f4bef7d52bf2e1eecc92635e62b6902fed322
|
7
|
+
data.tar.gz: 914f84301d2cdd53df3501180082dc556b7bae47a415c4775fd750a07343a2f7fd466be5d49c37761bf76d653df4e003ac0e0f4c52fd6ca4c7d9d9b35cbf80a1
|
@@ -13,7 +13,11 @@ module Darjeelink
|
|
13
13
|
def check_ip_whitelist
|
14
14
|
return unless Rails.env.production?
|
15
15
|
return unless Rails.application.config.permitted_ips
|
16
|
-
ip_to_verify = Rails.application.client_ip_header
|
16
|
+
ip_to_verify = if Rails.application.config.respond_to?(:client_ip_header) && Rails.application.config.client_ip_header.present?
|
17
|
+
request.headers[Rails.application.config.client_ip_header]
|
18
|
+
else
|
19
|
+
request.ip
|
20
|
+
end
|
17
21
|
|
18
22
|
return if Rails.application.config.permitted_ips.split(',').include? ip_to_verify
|
19
23
|
|
data/lib/darjeelink/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: darjeelink
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Hulme
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-02-
|
11
|
+
date: 2024-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth
|