BastionGuard/webui/notifications_feed.php
specialworld83 f0f913a209 Release 2.0
2026-07-15 10:52:22 +02:00

10 lines
430 B
PHP

<?php
include 'auth.php';
header('Content-Type: application/json; charset=utf-8');
@bg_import_ransomware_realtime_events();
$alerts = bg_alerts_read(10, true);
foreach ($alerts as $a) {
// Sends once only when configured. Failures are recorded in server logs but do not break UI toast polling.
@bg_alert_email_once($a);
}
echo json_encode(['ok'=>true, 'alerts'=>$alerts], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);