Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

sgupta1979's avatar

Class "Fideloper\Proxy\TrustProxies" not found

Hello

I upgraded Laravel 8.83 to Laravel version 10.

I am getting below error on my page Class "Fideloper\Proxy\TrustProxies" not found

Please guide

0 likes
4 replies
LaryAI's avatar
Level 58

This error occurs because the Fideloper\Proxy\TrustProxies class is no longer available in Laravel 10.

To fix this issue, you need to update your code to use the new middleware for trusting proxies.

Here are the steps to resolve the issue:

  1. Open the app/Http/Kernel.php file.

  2. Locate the protected $middleware property.

  3. Replace the line that includes Fideloper\Proxy\TrustProxies with the following line:

\Illuminate\Http\Middleware\TrustProxies::class,
  1. Save the file.

After making this change, the error should be resolved.

sgupta1979's avatar

Getting another error

Undefined constant Illuminate\Http\Request::HEADER_X_FORWARDED_ALL

Please guide

Please or to participate in this conversation.