finish support with otane

This commit is contained in:
xiaomlove
2022-03-20 22:14:00 +08:00
parent a5ea51de55
commit 0e4544459f
39 changed files with 427 additions and 104 deletions

View File

@@ -82,8 +82,8 @@ class AgentAllowRepository extends BaseRepository
$agentAllowId = $agentAllow->id;
$logPrefix = "[ID: $agentAllowId]";
$isPeerIdAllowed = $isAgentAllowed = $isPeerIdTooLow = $isAgentTooLow = false;
//check peer_id
if ($agentAllow->peer_id_pattern == '') {
//check peer_id, when handle scrape request, no peer_id, so let it pass
if ($agentAllow->peer_id_pattern == '' || $peerId === null) {
$isPeerIdAllowed = true;
} else {
$pattern = $agentAllow->peer_id_pattern;