Skip to content

Commit 56058ad

Browse files
ENGCOM-5143: Varnish health check failing due to presence of id_prefix in env.php #22307
- Merge Pull Request #22307 from Nazar65/magento2:issue-22143 - Merged commits: 1. cd92925
2 parents 353322d + cd92925 commit 56058ad

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pub/health_check.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@
5151
$cacheConfigs = $deploymentConfig->get(ConfigOptionsListConstants::KEY_CACHE_FRONTEND);
5252
if ($cacheConfigs) {
5353
foreach ($cacheConfigs as $cacheConfig) {
54-
if (!isset($cacheConfig[ConfigOptionsListConstants::CONFIG_PATH_BACKEND]) ||
54+
// allow config if only available "id_prefix"
55+
if (count($cacheConfig) === 1 && isset($cacheConfig['id_prefix'])) {
56+
continue;
57+
} elseif (!isset($cacheConfig[ConfigOptionsListConstants::CONFIG_PATH_BACKEND]) ||
5558
!isset($cacheConfig[ConfigOptionsListConstants::CONFIG_PATH_BACKEND_OPTIONS])) {
5659
http_response_code(500);
5760
$logger->error("Cache configuration is invalid");

0 commit comments

Comments
 (0)