2019-11-02 11:30:09 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
2022-01-04 17:50:41 +01:00
|
|
|
use function Shlinkio\Shlink\Config\env;
|
2021-08-07 11:05:20 +02:00
|
|
|
|
2021-10-09 10:53:21 +02:00
|
|
|
use const Shlinkio\Shlink\DEFAULT_REDIRECT_CACHE_LIFETIME;
|
|
|
|
use const Shlinkio\Shlink\DEFAULT_REDIRECT_STATUS_CODE;
|
|
|
|
|
2019-11-02 11:30:09 +01:00
|
|
|
return [
|
|
|
|
|
|
|
|
'not_found_redirects' => [
|
2021-12-14 22:21:53 +01:00
|
|
|
'invalid_short_url' => env('DEFAULT_INVALID_SHORT_URL_REDIRECT'),
|
|
|
|
'regular_404' => env('DEFAULT_REGULAR_404_REDIRECT'),
|
|
|
|
'base_url' => env('DEFAULT_BASE_URL_REDIRECT'),
|
2019-11-02 11:30:09 +01:00
|
|
|
],
|
|
|
|
|
2021-10-09 10:53:21 +02:00
|
|
|
'url_shortener' => [
|
|
|
|
// TODO Move these options to their own config namespace. Maybe "redirects".
|
|
|
|
'redirect_status_code' => (int) env('REDIRECT_STATUS_CODE', DEFAULT_REDIRECT_STATUS_CODE),
|
|
|
|
'redirect_cache_lifetime' => (int) env('REDIRECT_CACHE_LIFETIME', DEFAULT_REDIRECT_CACHE_LIFETIME),
|
|
|
|
],
|
|
|
|
|
2019-11-02 11:30:09 +01:00
|
|
|
];
|