Skip to content

Commit

Permalink
[10.x] Document ips method (#9196)
Browse files Browse the repository at this point in the history
* Document ips method

* Update requests.md

* Update requests.md

* Update requests.md

---------

Co-authored-by: Taylor Otwell <[email protected]>
  • Loading branch information
driesvints and taylorotwell authored Dec 14, 2023
1 parent 3cd7c9d commit a161d55
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,12 @@ The `ip` method may be used to retrieve the IP address of the client that made t

$ipAddress = $request->ip();

If you would like to retrieve an array of IP addresses, including all of the client IP addesses that were forwarded by proxies, you may use the `ips` method. The "original" client IP address will be at the end of the array:

$ipAddresses = $request->ips();

In general, IP addresses should be considered untrusted, user-controlled input and be used for informational purposes only.

<a name="content-negotiation"></a>
### Content Negotiation

Expand Down

0 comments on commit a161d55

Please sign in to comment.