diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php index 2fc3b32..8f17cce 100644 --- a/app/Http/Middleware/TrustProxies.php +++ b/app/Http/Middleware/TrustProxies.php @@ -22,7 +22,7 @@ public function handle(Request $request, Closure $next) { if (($ip = $request->header('Cf-Connecting-Ip')) !== null) { Log::debug('Current ip: '.$request->ip()); - $request->headers->set('REMOTE_ADDR', $ip); + $request->server->set('REMOTE_ADDR', $ip); Log::debug('New ip: '.$request->ip()); }