Skip to content

Commit ff2a118

Browse files
authoredJan 18, 2025
Merge pull request #56 from aiglesiasn/update-mezzio-factory
Implement hopCount variable in Mezzio's IpAddressFactory
2 parents e8ea2cd + d3d9ee1 commit ff2a118

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎src/Mezzio/IpAddressFactory.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,14 @@ public function __invoke(ContainerInterface $container): IpAddress
2727
$trustedProxies = $config['rka']['ip_address']['trusted_proxies'] ?? null;
2828
$attributeName = $config['rka']['ip_address']['attribute_name'] ?? null;
2929
$headersToInspect = $config['rka']['ip_address']['headers_to_inspect'] ?? [];
30+
$hopCount = $config['rka']['ip_address']['hop_count'] ?? 0;
3031

3132
return new IpAddress(
3233
$checkProxyHeaders,
3334
$trustedProxies,
3435
$attributeName,
35-
$headersToInspect
36+
$headersToInspect,
37+
$hopCount
3638
);
3739
}
3840
}

0 commit comments

Comments
 (0)