yyxx
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user