Skip to content

change ip method header index in request object #35630

Discussion options

You must be logged in to vote

you should use TrustProxies middleware and add your trusted proxies there.
https://laravel.com/docs/8.x/requests#configuring-trusted-proxies

Then, $request->ip() will return the correct ip.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@AliGhaleyan
Comment options

Answer selected by AliGhaleyan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants