0) { @ob_end_clean(); } ob_start(); header('Content-Type: application/json; charset=utf-8'); header('X-Content-Type-Options: nosniff'); header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0'); header('Pragma: no-cache'); header('Expires: 0'); require_once __DIR__ . '/../core.php'; require_once __DIR__ . '/../lsky.php'; $cfg = loadImgJson(); success([ 'max_images' => max(1, (int)($cfg['max_images'] ?? 3)), 'max_size_mb' => max(1, (int)($cfg['max_size_mb'] ?? 2)), 'allowed_exts' => array_map('strtolower', (array)($cfg['allowed_exts'] ?? ['jpg','jpeg','png'])), 'attach_enabled' => !empty($cfg['attach_enabled']), ], 'ok');