Target class [Fideloper\Proxy\TrustProxies] does not exist.

Posted by

I upgraded Laravel 5.5 to Laravel version 10.

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


local.ERROR: Target class [Fideloper\Proxy\TrustProxies] does not exist. {"exception":"[object] (Illuminate\\Contracts\\Container\\BindingResolutionException(code: 0): Target class [Fideloper\\Proxy\\TrustProxies] does not exist. at C:\\xampp\\htdocs\\myhospitalnow\\mhn-core-ms\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php:914)


Our local artificial intelligence developed this response on its own. Consider it an attempt to find a one-time solution to your issue. It won’t reply to any further messages.

Because Laravel 10 no longer supports the Fideloper\Proxy\TrustProxies class, this issue occurs.

You must upgrade your code to use the new middleware for trusting proxies in order to resolve this issue.

The steps to fix the problem are as follows:

  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:
  1. Save the file.

After making this change, the error should be resolved.

Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x