Used middleware from library to actually find visitor IP addresses

This commit is contained in:
Alejandro Celaya
2018-10-18 20:19:29 +02:00
parent 99f45d8853
commit 545094cddf
9 changed files with 90 additions and 45 deletions
+9 -2
View File
@@ -1,6 +1,7 @@
<?php
declare(strict_types=1);
use RKA\Middleware\IpAddress;
use Shlinkio\Shlink\Core\Action;
use Shlinkio\Shlink\Core\Middleware;
@@ -10,13 +11,19 @@ return [
[
'name' => 'long-url-redirect',
'path' => '/{shortCode}',
'middleware' => Action\RedirectAction::class,
'middleware' => [
IpAddress::class,
Action\RedirectAction::class,
],
'allowed_methods' => ['GET'],
],
[
'name' => 'pixel-tracking',
'path' => '/{shortCode}/track',
'middleware' => Action\PixelAction::class,
'middleware' => [
IpAddress::class,
Action\PixelAction::class,
],
'allowed_methods' => ['GET'],
],
[