去除__code__代码的引用
This commit is contained in:
@@ -120,7 +120,7 @@ class FpRiskExplain
|
||||
private static function loadAnalyzer()
|
||||
{
|
||||
if (!self::$analyzerLoaded) {
|
||||
require_once dirname(__DIR__, 2) . '/__code__/risk_analyzer_new.php';
|
||||
require_once __DIR__ . '/LogRiskAnalyzer.php';
|
||||
self::$analyzerLoaded = true;
|
||||
}
|
||||
}
|
||||
@@ -132,7 +132,7 @@ class FpRiskExplain
|
||||
}
|
||||
self::loadAnalyzer();
|
||||
try {
|
||||
$analyzer = new RiskAnalyzer($hdata);
|
||||
$analyzer = new LogRiskAnalyzer($hdata);
|
||||
return $analyzer->analyze();
|
||||
} catch (Throwable $e) {
|
||||
return ['error' => $e->getMessage()];
|
||||
@@ -417,8 +417,8 @@ class FpRiskExplain
|
||||
if ($localLevel !== null && $apiLevel !== null && abs($localLevel - $apiLevel) > 3) {
|
||||
$lines[] = [
|
||||
'level' => 'alert',
|
||||
'text' => sprintf('API reason 解析风险分 %d,本地 risk_analyzer 复算 %d,两者不一致。', $apiLevel, $localLevel),
|
||||
'action' => '线上 byApiRisk 版本可能与本地 __code__/risk_analyzer_new.php 不同步,或 reason 格式有变,需核对 API 部署。',
|
||||
'text' => sprintf('API reason 解析风险分 %d,日志复算风险分 %d,两者不一致。', $apiLevel, $localLevel),
|
||||
'action' => '线上 byApiRisk 版本可能与 lib/Cloak/LogRiskAnalyzer.php 不同步,或 reason 格式有变,需核对 API 部署。',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -40,7 +40,7 @@ if (!function_exists('cloak_visitor_log_format_timing')) {
|
||||
return '';
|
||||
}
|
||||
if (!class_exists('CloakPipelineTimer', false)) {
|
||||
require_once dirname(__DIR__) . '/Cloak/PipelineTimer.php';
|
||||
require_once __DIR__ . '/Cloak/PipelineTimer.php';
|
||||
}
|
||||
$decoded = json_decode($raw, true);
|
||||
if (is_array($decoded)) {
|
||||
@@ -99,7 +99,7 @@ if (!function_exists('cloak_visitor_log_fp_risk_explain')) {
|
||||
function cloak_visitor_log_fp_risk_explain($fpHdata, $reason, $result, $domain = '')
|
||||
{
|
||||
if (!class_exists('FpRiskExplain', false)) {
|
||||
require_once dirname(__DIR__) . '/Cloak/FpRiskExplain.php';
|
||||
require_once __DIR__ . '/Cloak/FpRiskExplain.php';
|
||||
}
|
||||
return FpRiskExplain::build($fpHdata, $reason, $result, $domain);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user