Upgrading Laravel 5.5 to 5.6 error

前端 未结 12 1924
梦如初夏
梦如初夏 2020-12-08 09:38

I am trying to upgrade my Laravel 5.5 to 5.6. I have followed the instructions from the laravel website, yet I got this error:

Your         


        
12条回答
  •  感情败类
    2020-12-08 10:10

    Your problem comes from your use of the library TrustedProxy.

    It uses Symfony's HEADER_CLIENT_IP constant which was deprecated with Symfony 3.3 and completely removed in Symfony 4.0.

    Since Laravel 5.6 has updated to use Symfony 4 components, this will no longer work.

    The way to solve it is to do what patricus suggested and use Laravel's TrustProxies middleware.

提交回复
热议问题