mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 12:12:48 +01:00
Fix to show real IP when using CloudFlare
This commit is contained in:
parent
d891aaedef
commit
c0679cf197
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user