diff --git a/composer.json b/composer.json index 4f8ca4df..34168f62 100644 --- a/composer.json +++ b/composer.json @@ -45,7 +45,7 @@ "php-middleware/request-id": "^4.1", "pugx/shortid-php": "^1.1", "ramsey/uuid": "^4.7", - "shlinkio/shlink-common": "dev-main#8253378 as 5.7", + "shlinkio/shlink-common": "dev-main#4e859a7 as 5.7", "shlinkio/shlink-config": "dev-main#c0aa01f as 2.5", "shlinkio/shlink-event-dispatcher": "dev-main#bd3a62b as 3.1", "shlinkio/shlink-importer": "^5.1", diff --git a/module/Core/config/dependencies.config.php b/module/Core/config/dependencies.config.php index da653406..a245b10e 100644 --- a/module/Core/config/dependencies.config.php +++ b/module/Core/config/dependencies.config.php @@ -9,7 +9,6 @@ use Laminas\ServiceManager\Factory\InvokableFactory; use Psr\EventDispatcher\EventDispatcherInterface; use Shlinkio\Shlink\Common\Doctrine\EntityRepositoryFactory; use Shlinkio\Shlink\Config\Factory\ValinorConfigFactory; -use Shlinkio\Shlink\Core\ErrorHandler; use Shlinkio\Shlink\Core\Options\NotFoundRedirectOptions; use Shlinkio\Shlink\Importer\ImportedLinksProcessorInterface; use Shlinkio\Shlink\IpGeolocation\Resolver\IpLocationResolverInterface; diff --git a/module/Rest/config/acess-logs.config.php b/module/Rest/config/acess-logs.config.php new file mode 100644 index 00000000..1f0dd0e8 --- /dev/null +++ b/module/Rest/config/acess-logs.config.php @@ -0,0 +1,27 @@ + [ + 'ignored_paths' => [ + 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( + [AccessLogMiddleware::LOGGER_SERVICE_NAME, 'config.access_logs.ignored_paths'], + ), + ], + +]; diff --git a/module/Rest/src/Action/HealthAction.php b/module/Rest/src/Action/HealthAction.php index f3bfea98..809bf4d1 100644 --- a/module/Rest/src/Action/HealthAction.php +++ b/module/Rest/src/Action/HealthAction.php @@ -17,7 +17,7 @@ class HealthAction extends AbstractRestAction private const STATUS_PASS = 'pass'; private const STATUS_FAIL = 'fail'; - protected const ROUTE_PATH = '/health'; + public const ROUTE_PATH = '/health'; protected const ROUTE_ALLOWED_METHODS = [self::METHOD_GET]; public function __construct(private EntityManagerInterface $em, private AppOptions $options)