Used middleware from library to actually find visitor IP addresses

This commit is contained in:
Alejandro Celaya
2018-10-18 20:19:22 +02:00
parent 99f45d8853
commit 545094cddf
9 changed files with 90 additions and 45 deletions

View File

@@ -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);
}
}