Skip to content

Commit

Permalink
Fix middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
asbiin committed Mar 10, 2024
1 parent 28855ea commit 4849402
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Middleware/TrustProxies.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

Expand Down

0 comments on commit 4849402

Please sign in to comment.