라라벨 6.18.16 -> 6.18.26 업데이트 이후 에러

 

* 에러 메시지

"Argument 2 passed to Symfony\Component\HttpFoundation\Request::setTrustedProxies() must be of the type int, array given, called in \vendor\fideloper\proxy\src\TrustProxies.php on line 54 "



* 해결 방법

app\Http\Middleware\TrustProxies.php

 

   오류난 설정

    protected $headers = [

        Request::HEADER_FORWARDED => 'FORWARDED',

        Request::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR',

        Request::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST',

        Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT',

        Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO',

    ];

 

    를 다음 으로 변경

 

    protected $headers = Request::HEADER_X_FORWARDED_ALL;

    

Posted by 코덴스

댓글을 달아 주세요