This module adjusts the global variables $_SERVER['REMOTE_ADDR'], $_SERVER['HTTPS'], and $_SERVER['HTTP_X_FORWARDED_PROTO'] to their correct values when using CloudFlare.
php composer.phar require "stuki/cloudflare": "dev-master"Enable module in config/application.config.php:
return array(
'modules' => array(
'Stuki\\CloudFlare',
...
),Included in this repo are .htaccess rewrite rules to allow only CloudFlare apps to connect to your application and redirect all other traffic sources to your CloudFlare hosted domain.