Skip to content

Commit 03286d3

Browse files
committedMar 11, 2025
Support HTTP_CF_CONNECTING_IP
1 parent 4a3e441 commit 03286d3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎src/GeoIP.php

+2
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ public function getCache(): \InteractionDesignFoundation\GeoIP\Cache
224224
*/
225225
public function getClientIP(): string
226226
{
227+
/** @see \Symfony\Component\HttpKernel\HttpCache\SubRequestHandler */
227228
$remotes_keys = [
228229
'HTTP_X_FORWARDED_IP',
229230
'HTTP_X_FORWARDED_FOR',
@@ -234,6 +235,7 @@ public function getClientIP(): string
234235
'HTTP_FORWARDED',
235236
'REMOTE_ADDR',
236237
'HTTP_X_CLUSTER_CLIENT_IP',
238+
'HTTP_CF_CONNECTING_IP',
237239
];
238240

239241
foreach ($remotes_keys as $key) {

0 commit comments

Comments
 (0)