Skip to content

Commit

Permalink
Merge pull request #56 from aiglesiasn/update-mezzio-factory
Browse files Browse the repository at this point in the history
Implement hopCount variable in Mezzio's IpAddressFactory
  • Loading branch information
akrabat authored Jan 18, 2025
2 parents e8ea2cd + d3d9ee1 commit ff2a118
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Mezzio/IpAddressFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ public function __invoke(ContainerInterface $container): IpAddress
$trustedProxies = $config['rka']['ip_address']['trusted_proxies'] ?? null;
$attributeName = $config['rka']['ip_address']['attribute_name'] ?? null;
$headersToInspect = $config['rka']['ip_address']['headers_to_inspect'] ?? [];
$hopCount = $config['rka']['ip_address']['hop_count'] ?? 0;

return new IpAddress(
$checkProxyHeaders,
$trustedProxies,
$attributeName,
$headersToInspect
$headersToInspect,
$hopCount
);
}
}

0 comments on commit ff2a118

Please sign in to comment.