Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Install and configure mod_cloudflare

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 moonshine
Octocat-spinner-32 spec
Octocat-spinner-32 README.rdoc


A plugin for Moonshine

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://

  • Rails 3: rails plugin install git://

  • No configuration needed!

  • Include the recipe in your Moonshine manifest

    recipe :cloudflare
Something went wrong with that request. Please try again.