0.0
The project is in a healthy, maintained state
This library ensures Cloudflare IPs are used with rails.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

>= 7.0.0
 Project Readme

Cloudflare IPs

LICENSE RubyGems GitHub Yard CircleCI

CloudflareIPs assigns the proxy IPv4 and IPv6 Cloudflare IPs allowing request.remote_ip to return back the actual IP instead of a Cloudflare datacenter IP.

Installation

Configure the Cloudflare IPs gem for any environment needed:

gem "cloudflare-ips"
$ bundle

Usage

Use request.remote_ip instead of request.ip to properly retrieve IPs:

request.remote_ip