2016-04-10 10:38:07 +03:00
|
|
|
<?php
|
2016-08-09 11:24:42 +03:00
|
|
|
use Shlinkio\Shlink\Core\Action;
|
2016-08-09 14:41:30 +03:00
|
|
|
use Shlinkio\Shlink\Core\Middleware;
|
2016-04-10 10:38:07 +03:00
|
|
|
|
|
|
|
return [
|
|
|
|
|
|
|
|
'routes' => [
|
2016-04-30 19:59:03 +03:00
|
|
|
[
|
|
|
|
'name' => 'long-url-redirect',
|
|
|
|
'path' => '/{shortCode}',
|
2016-08-09 11:24:42 +03:00
|
|
|
'middleware' => Action\RedirectAction::class,
|
|
|
|
'allowed_methods' => ['GET'],
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'name' => 'short-url-qr-code',
|
|
|
|
'path' => '/qr/{shortCode}[/{size:[0-9]+}]',
|
2016-08-09 14:41:30 +03:00
|
|
|
'middleware' => [
|
|
|
|
Middleware\QrCodeCacheMiddleware::class,
|
|
|
|
Action\QrCodeAction::class,
|
|
|
|
],
|
2016-04-30 19:59:03 +03:00
|
|
|
'allowed_methods' => ['GET'],
|
|
|
|
],
|
2016-08-18 12:10:15 +03:00
|
|
|
[
|
|
|
|
'name' => 'short-url-preview',
|
|
|
|
'path' => '/{shortCode}/preview',
|
|
|
|
'middleware' => Action\PreviewAction::class,
|
|
|
|
'allowed_methods' => ['GET'],
|
|
|
|
],
|
2016-04-10 10:38:07 +03:00
|
|
|
],
|
2016-04-17 20:34:16 +03:00
|
|
|
|
2016-04-10 10:38:07 +03:00
|
|
|
];
|