13/10
2016
Wallogit.com
2017 © Pedro Peláez
An easy way to normalize your Cloudflare-altered HTTP Information with a single line.
An easy way to normalize your Cloudflare-altered HTTP Information with a single line., (*1)
This will help your Framework to understand what is happening with the current connection made from Cloudflare's server.
This will just simply change your $_SERVER variables., (*2)
Simply do this JUST BEFORE EVERYTHING STARTS!, (*3)
require_once('cf-adaptor/cf-adaptor.php');
Here's an example with Fat Free Framework, (*4)
array_map(function($_p){ require_once($_p); },[
'app/Adaptor/cf-adaptor.php', // see? this is the adaptor
'app/f3/base.php',
'app/config.php',
'app/app.php'
]);
\F3::run();
$_SERVER['REMOTE_ADDR'] var.