cloudflare-rails 2.2.0 → 2.3.0
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/CHANGELOG.md +3 -0
- data/README.md +1 -1
- data/lib/cloudflare/rails/railtie.rb +7 -1
- data/lib/cloudflare/rails/version.rb +1 -1
- metadata +2 -3
- data/.travis.yml +0 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: de21d6707867ee11c0af5dae9a254f95fc03e2071d07a86db0406a2c1c400fd2
|
|
4
|
+
data.tar.gz: 50ed388a769ce657b4b9b79d3244d6551aead94d74969bd8b1d4e0af6cc5b4cf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 908b5340a7335a2e26e32290a41017c512cc67fa4124eee4ec9e92b0eb525c8221c532c27e90b12ddd2ec1e994c6af0877d5b727eb0c986d130b94fd20be6bf6
|
|
7
|
+
data.tar.gz: 95f000b7ed2033010d400d51ad4834d025286308a887da61bb315cd7e7665452f59852b92918c702fe10dbe57281cd773041c3988b2e6c856f04a2c1ad323538
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [2.3.0] - 2021-10-22
|
|
8
|
+
- Better handling of malformed IP addresses (https://github.com/modosc/cloudflare-rails/pull/49)
|
|
9
|
+
|
|
7
10
|
## [2.2.0] - 2021-06-11
|
|
8
11
|
- Fix typo in `actionpack` dependency
|
|
9
12
|
|
data/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Cloudflare::Rails [](https://badge.fury.io/rb/cloudflare-rails) [](https://badge.fury.io/rb/cloudflare-rails) [](https://circleci.com/gh/modosc/cloudflare-rails/tree/main)
|
|
2
2
|
This gem correctly configures Rails for [CloudFlare](https://www.cloudflare.com) so that `request.remote_ip` / `request.ip` both work correctly.
|
|
3
3
|
|
|
4
4
|
## Rails Compatibility
|
|
@@ -7,7 +7,13 @@ module Cloudflare
|
|
|
7
7
|
# correct inside of rack and rails
|
|
8
8
|
module CheckTrustedProxies
|
|
9
9
|
def trusted_proxy?(ip)
|
|
10
|
-
::Rails.application.config.cloudflare.ips.any?
|
|
10
|
+
matching = ::Rails.application.config.cloudflare.ips.any? do |proxy|
|
|
11
|
+
begin
|
|
12
|
+
proxy === ip
|
|
13
|
+
rescue IPAddr::InvalidAddressError
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
matching || super
|
|
11
17
|
end
|
|
12
18
|
end
|
|
13
19
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cloudflare-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- jonathan schatz
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-10-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -224,7 +224,6 @@ files:
|
|
|
224
224
|
- ".rubocop.yml"
|
|
225
225
|
- ".rubocop_airbnb.yml"
|
|
226
226
|
- ".rubocop_todo.yml"
|
|
227
|
-
- ".travis.yml"
|
|
228
227
|
- Appraisals
|
|
229
228
|
- CHANGELOG.md
|
|
230
229
|
- Gemfile
|
data/.travis.yml
DELETED