From a161d55be58e3c2738107d3be742df2133a3c354 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Thu, 14 Dec 2023 16:14:42 +0100 Subject: [PATCH] [10.x] Document `ips` method (#9196) * Document ips method * Update requests.md * Update requests.md * Update requests.md --------- Co-authored-by: Taylor Otwell --- requests.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/requests.md b/requests.md index 6089d056ec2..1f86889a666 100644 --- a/requests.md +++ b/requests.md @@ -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. + ### Content Negotiation