feat: chunk wildcard domains response into 300-line blocks with 5 empty lines between

This commit is contained in:
Rekryt 2026-04-13 21:59:22 +03:00
parent 84412cb1a4
commit 853d2bebe7

View file

@ -16,4 +16,16 @@ class WildcardController extends TextController {
$this->request->setQueryParameter('wildcard', '1');
return parent::getBody();
}
protected function render(array $response): string {
$chunks = array_chunk($response, 300);
$result = [];
foreach ($chunks as $chunk) {
$result[] = implode(self::DELIMITER, $chunk);
}
// 5 пустых строк между блоками
return implode(str_repeat(self::DELIMITER, 6), $result);
}
}