Level 1
hello. anyone ???
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I recently updated to laravel v7.25.0 from 7.6.2. the error was :
Argument 2 passed to Symfony\Component\HttpFoundation\Request::setTrustedProxies() must be of the type int, array given,
Then I resolved with the help of someone in the forum by changing
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',
];
to :
protected $headers = Request::HEADER_X_FORWARDED_ALL;
the API calls through postman is working. since I send token with specific scopes.
For dashboard I have another api route group with middleware. Now every request is Unauthenticated
Please or to participate in this conversation.