修复配置获取
This commit is contained in:
@@ -48,7 +48,12 @@ class FCheckHandler
|
||||
if (!class_exists('ConfigLoader', false)) {
|
||||
require_once dirname(__DIR__, 2) . '/config/ConfigLoader.php';
|
||||
}
|
||||
$config_name = ConfigLoader::loadByHost($fp_host);
|
||||
$explicitConfig = trim((string) ($fingerprint_info['config_name'] ?? ''));
|
||||
$config_name = ConfigLoader::loadForFingerprint(
|
||||
(string) ($fingerprint_info['domain'] ?? ''),
|
||||
$fp_host,
|
||||
$explicitConfig !== '' ? $explicitConfig : null
|
||||
);
|
||||
$log_id = (int) ($fingerprint_info['log_id'] ?? 0);
|
||||
if ($log_id <= 0) {
|
||||
$log_id = VisitorVisitContext::currentLogId();
|
||||
@@ -191,9 +196,10 @@ class FCheckHandler
|
||||
RiskSecondaryCache::applyToSession($cached);
|
||||
$response = RiskSecondaryCache::toApiResponse($cached);
|
||||
|
||||
$resultStr = $response['result'] ? 'true' : 'false';
|
||||
$update_log = [
|
||||
'result' => $response['result'] ? 'true' : 'false',
|
||||
'reason' => cloak_cache_hit_log_reason($update_log['result']),
|
||||
'result' => $resultStr,
|
||||
'reason' => cloak_cache_hit_log_reason($resultStr),
|
||||
'fp_url' => trim((string) ($response['link'] ?? '')),
|
||||
];
|
||||
if ($update_log['fp_url'] === '') {
|
||||
|
||||
Reference in New Issue
Block a user