stuki / cloudflare
A ZF2 plugin to fix global variables when using CloudFlare
Installs: 437
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 0
pkg:composer/stuki/cloudflare
Requires
- php: >=5.3.3
- zendframework/zendframework: >=2.2
This package is auto-updated.
Last update: 2025-10-11 16:09:49 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.