Closed DaniloBenevides closed 4 years ago
hi! What’s your trustproxies middleware have in it?
On Thu, Jun 25, 2020 at 05:25 Danilo Benevides notifications@github.com wrote:
I'm using Laravel 5.8 and after this lib updated to version 4.4 I got the following error:
Argument 2 passed to Symfony\Component\HttpFoundation\Request::setTrustedProxies() must be of the type integer, array given, called in vendor/fideloper/proxy/src/TrustProxies.php on line 54
I could not reproduce this issue on 4.3
There is something that I should do?
Thanks in advice,
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fideloper/TrustedProxy/issues/136, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADSDU7J54TMQI32PFFIBS3RYMQZXANCNFSM4OIHGPDQ .
`<?php
namespace App\Http\Middleware;
use Illuminate\Http\Request; use Fideloper\Proxy\TrustProxies as Middleware;
class TrustProxies extends Middleware { /**
@var array */ protected $proxies;
/**
Thanks!
For the $headers variable, and those settings, please use this in Laravel 5.8:
https://github.com/laravel/laravel/blob/5.8/app/Http/Middleware/TrustProxies.php#L22
protected $headers = Request::HEADER_X_FORWARDED_ALL;
I'm using Laravel 5.8 and after this lib updated to version 4.4 I got the following error:
Argument 2 passed to Symfony\Component\HttpFoundation\Request::setTrustedProxies() must be of the type integer, array given, called in vendor/fideloper/proxy/src/TrustProxies.php on line 54
I could not reproduce this issue on 4.3
There is something that I should do?
Thanks in advice,