yyxx
All checks were successful
Deploy / deploy-staging (push) Successful in 6s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-05-05 23:46:23 +02:00
parent e335a8d5bf
commit 48b7583f19
9 changed files with 528 additions and 277 deletions

View File

@@ -44,14 +44,7 @@ final class Router
$this->config = ModuleConfig::load($this->moduleBasePath);
$requestUri = (string) ($_SERVER['REQUEST_URI'] ?? '');
$requestPath = (string) (parse_url($requestUri, PHP_URL_PATH) ?: '');
$debugConfig = $this->config->debug();
$debugEnabled = filter_var(
$_GET['debug']
?? $_SERVER['HTTP_X_MINING_DEBUG']
?? $_COOKIE['mining_checker_debug']
?? ($debugConfig['enabled'] ?? false),
FILTER_VALIDATE_BOOL
);
$debugEnabled = function_exists('nexus_debug_enabled') ? nexus_debug_enabled() : false;
$latestDebugFilePath = rtrim($this->config->debugDir(), '/') . '/latest-server.json';
$isLatestDebugRequest = str_ends_with($requestPath, '/api/mining-checker/v1/debug/latest')
|| $requestPath === 'api/mining-checker/v1/debug/latest'