mirror of
https://github.com/rekryt/iplist.git
synced 2025-10-13 00:49:36 +03:00
chore: add pretty print for amnezia format
This commit is contained in:
@@ -29,6 +29,9 @@ class AmneziaController extends AbstractIPListController {
|
|||||||
}
|
}
|
||||||
$response = SiteFactory::normalizeArray($response, in_array($data, ['ipv4', 'ipv6', 'cidr4', 'cidr6']));
|
$response = SiteFactory::normalizeArray($response, in_array($data, ['ipv4', 'ipv6', 'cidr4', 'cidr6']));
|
||||||
|
|
||||||
return json_encode(array_map(fn(string $item) => ['hostname' => $item, 'ip' => ''], $response));
|
return json_encode(
|
||||||
|
array_map(fn(string $item) => ['hostname' => $item, 'ip' => ''], $response),
|
||||||
|
JSON_PRETTY_PRINT
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user