shlink/module/Core/config/routes.config.php

51 lines
1.4 KiB
PHP
Raw Normal View History

2016-04-10 02:38:07 -05:00
<?php
2017-10-12 03:13:20 -05:00
declare(strict_types=1);
2016-08-09 03:24:42 -05:00
use Shlinkio\Shlink\Core\Action;
use Shlinkio\Shlink\Core\Middleware;
2016-04-10 02:38:07 -05:00
return [
'routes' => [
[
'name' => 'long-url-redirect',
'path' => '/{shortCode}',
2016-08-09 03:24:42 -05:00
'middleware' => Action\RedirectAction::class,
'allowed_methods' => ['GET'],
],
[
'name' => 'pixel-tracking',
'path' => '/{shortCode}/track',
'middleware' => Action\PixelAction::class,
'allowed_methods' => ['GET'],
],
2016-08-09 03:24:42 -05:00
[
'name' => 'short-url-qr-code',
2016-08-18 04:31:04 -05:00
'path' => '/{shortCode}/qr-code[/{size:[0-9]+}]',
'middleware' => [
Middleware\QrCodeCacheMiddleware::class,
Action\QrCodeAction::class,
],
'allowed_methods' => ['GET'],
],
[
'name' => 'short-url-preview',
'path' => '/{shortCode}/preview',
'middleware' => Action\PreviewAction::class,
'allowed_methods' => ['GET'],
],
2016-08-18 04:31:04 -05:00
// Old QR code route. Deprecated
[
'name' => 'short-url-qr-code-old',
'path' => '/qr/{shortCode}[/{size:[0-9]+}]',
'middleware' => [
Middleware\QrCodeCacheMiddleware::class,
Action\QrCodeAction::class,
],
'allowed_methods' => ['GET'],
],
2016-04-10 02:38:07 -05:00
],
2016-04-17 12:34:16 -05:00
2016-04-10 02:38:07 -05:00
];