mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-06 23:33:13 +08:00
Used middleware from library to actually find visitor IP addresses
This commit is contained in:
@@ -11,6 +11,8 @@ use Zend\ServiceManager\Factory\FactoryInterface;
|
||||
|
||||
class IpAddressMiddlewareFactory implements FactoryInterface
|
||||
{
|
||||
public const REMOTE_ADDRESS = 'remote_address';
|
||||
|
||||
/**
|
||||
* Create an object
|
||||
*
|
||||
@@ -22,6 +24,6 @@ class IpAddressMiddlewareFactory implements FactoryInterface
|
||||
*/
|
||||
public function __invoke(ContainerInterface $container, $requestedName, array $options = null): IpAddress
|
||||
{
|
||||
return new IpAddress(true, []);
|
||||
return new IpAddress(true, [], self::REMOTE_ADDRESS);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user