A plugin for installing and managing mod_cloudflare for Apache.
If you’re using CloudFlare, request.remote_ip always comes from a CloudFlare IP address! This is bad if you’re using the IP address for geolocation, or fraud control, or anything else. This Apache module takes the CF-Connecting-IP header from CloudFlare and replaces remote_ip with it. It only does the switch for traffic proxied by CloudFlare. All other requests are unaffected.
-
Rails 2:
script/plugin install git://github.com/jarinudom/moonshine_cloudflare.git
-
Rails 3:
rails plugin install git://github.com/jarinudom/moonshine_cloudflare.git
-
Rails 4:
plugger install git://github.com/jarinudom/moonshine_cloudflare.git
-
No configuration needed!
-
Include the recipe in your Moonshine manifest
recipe :cloudflare