修复判断入口文件ip_check.php以及新增复制配置选项
This commit is contained in:
@@ -51,6 +51,13 @@ if ($tests['resolver_available']) {
|
||||
if (!$tests['allowlist_us'] || !$tests['allowlist_cn']) {
|
||||
$ok = false;
|
||||
}
|
||||
|
||||
$tests['normalize_iso2'] = CountryCodeNormalizer::toAlpha2('us') === 'US';
|
||||
$tests['normalize_name'] = CountryCodeNormalizer::toAlpha2('United States') === 'US';
|
||||
$tests['allowlist_name'] = CountryAllowlist::isAllowed('United Kingdom', CountryAllowlist::parse('GB,US'));
|
||||
if (!$tests['normalize_iso2'] || !$tests['normalize_name'] || !$tests['allowlist_name']) {
|
||||
$ok = false;
|
||||
}
|
||||
}
|
||||
|
||||
echo json_encode([
|
||||
|
||||
Reference in New Issue
Block a user