1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Merge CloudFlare IP fix

This commit is contained in:
Hillel Coren 2016-11-27 16:59:24 +02:00
parent e522f254a8
commit 54a1594bb3

View File

@ -65,4 +65,9 @@ $app->configureMonologUsing(function($monolog) {
$monolog->pushHandler(new Monolog\Handler\StreamHandler(storage_path() . '/logs/laravel-error.log', Monolog\Logger::ERROR, false));
});
// Capture real IP if using cloudflare
if (isset($_SERVER["HTTP_CF_CONNECTING_IP"])) {
$_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_CF_CONNECTING_IP"];
}
return $app;