finish announce api

This commit is contained in:
xiaomlove
2022-03-18 15:44:04 +08:00
parent 6665c98169
commit ab1ed60f44
13 changed files with 151 additions and 125 deletions
+3 -3
View File
@@ -56,9 +56,9 @@ class AgentAllowRepository extends BaseRepository
}
$matchCount = count($matches) - 1;
//due to old data may be matchNum > matchCount
if ($matchNum > $matchCount && !IN_NEXUS) {
throw new ClientNotAllowedException("pattern: $pattern match start: $start got matches count: $matchCount, but require $matchNum.");
}
// if ($matchNum > $matchCount && !IN_NEXUS) {
// throw new ClientNotAllowedException("pattern: $pattern match start: $start got matches count: $matchCount, but require $matchNum.");
// }
return array_slice($matches, 1, $matchNum);
}