Error:
Argument 2 passed to Symfony\Component\HttpFoundation\Request::setTrustedProxies() must be of the type integer, array given, called in /home/sergi/Code/lanparty/vendor/fideloper/proxy/src/TrustProxies.php on line 54
Ok solved reading Upgrade Guide (sorry guys).
Please if you have also this issue see Trusted proxies section at:
Hi, what was the exact library to upgrade to avoid this error? I dont use some of the librabries mention so I only changed "laravel/framework": "5.6.*", "fideloper/proxy": "~4.0", "phpunit/phpunit": "~7.0".
I still get the error in post.
For anyone else arriving here, the solution is to change the array on line 22 of App/Http/Middleware/TrustedProxies from an array, to a constant:
protected $headers = Request::HEADER_X_FORWARDED_ALL;
Ref: StackOverflow
This change to the TrustProxies middleware is specifically stated in the upgrade guide.
I see that now. It wasn鈥檛 obvious in my particular case because the upgrade occurred by composer update. It wasn鈥檛 until I got the error and found this thread that I realized Laravel had upgraded, and the StackOverflow post ranks higher in search for the error than the upgrade guide.
I just fix this problem with @acacha suggested section Trusted Proxies fix. But i rlly didnt understand what i did.
:D Anyone, explain me what the fuck i just touch? what is the Trusted Proxies file
I just fix this problem with @acacha suggested section _Trusted Proxies_ fix. But i rlly didnt understand what i did.
:D Anyone, explain me what the fuck i just touch? what is the Trusted Proxies file
hahahaaaa.. that also solved my problem. hoping someone can at least guide us on the docs.
Most helpful comment
For anyone else arriving here, the solution is to change the array on line 22 of App/Http/Middleware/TrustedProxies from an array, to a constant:
Ref: StackOverflow