stuki / cloudflare
A ZF2 plugin to fix global variables when using CloudFlare
1.0.0
2014-09-15 17:28 UTC
Requires
- php: >=5.3.3
- zendframework/zendframework: >=2.2
This package is auto-updated.
Last update: 2024-11-11 14:06:18 UTC
README
This module adjusts the global variables $_SERVER['REMOTE_ADDR'], $_SERVER['HTTPS'], and $_SERVER['HTTP_X_FORWARDED_PROTO'] to their correct values when using CloudFlare.
Install
php composer.phar require "stuki/cloudflare": "dev-master"
Enable module in config/application.config.php
:
return array( 'modules' => array( 'Stuki\\CloudFlare', ... ),
.htaccess
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.