2023-10-20 10:26:09 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace Shlinkio\Shlink\Rest;
|
|
|
|
|
|
|
|
use Laminas\ServiceManager\AbstractFactory\ConfigAbstractFactory;
|
|
|
|
use Laminas\Stdlib\ArrayUtils\MergeReplaceKey;
|
|
|
|
use Shlinkio\Shlink\Common\Middleware\AccessLogMiddleware;
|
|
|
|
|
|
|
|
return [
|
|
|
|
|
|
|
|
'access_logs' => [
|
2023-11-29 14:34:13 +03:00
|
|
|
'ignored_path_prefixes' => [
|
2023-10-20 10:26:09 +03:00
|
|
|
Action\HealthAction::ROUTE_PATH,
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
// This config needs to go in this file in order to override the value defined in shlink-common
|
|
|
|
ConfigAbstractFactory::class => [
|
|
|
|
// Use MergeReplaceKey to overwrite what was defined in shlink-common, instead of merging it
|
|
|
|
AccessLogMiddleware::class => new MergeReplaceKey(
|
2023-11-29 14:34:13 +03:00
|
|
|
[AccessLogMiddleware::LOGGER_SERVICE_NAME, 'config.access_logs.ignored_path_prefixes'],
|
2023-10-20 10:26:09 +03:00
|
|
|
),
|
|
|
|
],
|
|
|
|
|
|
|
|
];
|