Skip to content

Allow Rails request.remote_ip to defer to Fly.io's connecting IP.

License

Notifications You must be signed in to change notification settings

pcai/actionpack-fly

Repository files navigation

Actionpack::Fly

Build Status

Simple gem that extends Rails request.remote_ip to default to Fly's Fly-Client-IP header. More about Fly HTTP Request Headers and why we choose to trust Fly-Client-IP.

Installation

Add this line to your Rails application's Gemfile:

gem 'actionpack-fly'

Usage

None! Just install and feel confident that request.remote_ip is doing its job.

Contributing

License

The gem is available as open source under the terms of the MIT License.

Credits

Forked from https://github.com/customink/actionpack-cloudflare