Skip to content

Commit

Permalink
Add "App URL external check" checker (#276)
Browse files Browse the repository at this point in the history
  • Loading branch information
M-arcus authored Sep 1, 2024
1 parent 632436a commit 4897e27
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

declare(strict_types=1);

namespace Frosh\Tools\Components\Health\Checker\PerformanceChecker;

use Frosh\Tools\Components\Health\Checker\CheckerInterface;
use Frosh\Tools\Components\Health\HealthCollection;
use Frosh\Tools\Components\Health\SettingsResult;
use Shopware\Core\DevOps\Environment\EnvironmentHelper;

class DisableAppUrlExternalCheckChecker implements PerformanceCheckerInterface, CheckerInterface
{
public function collect(HealthCollection $collection): void
{
$appUrlCheckDisabled = (bool) EnvironmentHelper::getVariable('APP_URL_CHECK_DISABLED', false);
if (!$appUrlCheckDisabled) {
$collection->add(
SettingsResult::warning(
'app-url-check-disabled',
'App URL external check',
'enabled',
'disabled',
'https://developer.shopware.com/docs/guides/hosting/performance/performance-tweaks.html#disable-app-url-external-check',
),
);
}
}
}

0 comments on commit 4897e27

Please sign in to comment.