2019-11-02 13:30:09 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
2021-08-07 12:05:20 +03:00
|
|
|
use function Shlinkio\Shlink\Common\env;
|
|
|
|
|
2021-10-09 11:53:21 +03:00
|
|
|
use const Shlinkio\Shlink\DEFAULT_REDIRECT_CACHE_LIFETIME;
|
|
|
|
use const Shlinkio\Shlink\DEFAULT_REDIRECT_STATUS_CODE;
|
|
|
|
|
2019-11-02 13:30:09 +03:00
|
|
|
return [
|
|
|
|
|
|
|
|
'not_found_redirects' => [
|
2021-12-09 12:30:33 +03:00
|
|
|
// Deprecated env vars
|
|
|
|
'invalid_short_url' => env('DEFAULT_INVALID_SHORT_URL_REDIRECT', env('INVALID_SHORT_URL_REDIRECT_TO')),
|
|
|
|
'regular_404' => env('DEFAULT_REGULAR_404_REDIRECT', env('REGULAR_404_REDIRECT_TO')),
|
|
|
|
'base_url' => env('DEFAULT_BASE_URL_REDIRECT', env('BASE_URL_REDIRECT_TO')),
|
2019-11-02 13:30:09 +03:00
|
|
|
],
|
|
|
|
|
2021-10-09 11:53:21 +03: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 13:30:09 +03:00
|
|
|
];
|