mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-13 22:54:25 +01:00
Merge CloudFlare IP fix
This commit is contained in:
parent
e522f254a8
commit
54a1594bb3
@ -65,4 +65,9 @@ $app->configureMonologUsing(function($monolog) {
|
|||||||
$monolog->pushHandler(new Monolog\Handler\StreamHandler(storage_path() . '/logs/laravel-error.log', Monolog\Logger::ERROR, false));
|
$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;
|
return $app;
|
||||||
|
Loading…
Reference in New Issue
Block a user