<?php
header('Content-Type: application/json; charset=UTF-8');
header('Cache-Control: no-store');
$cfgFile = '/etc/mvlog/push.php';
if (!is_file($cfgFile)) {
    echo json_encode(['enabled' => false]);
    exit;
}
$cfg = require $cfgFile;
$public = (string)($cfg['public_key'] ?? '');
echo json_encode(['enabled' => $public !== '', 'publicKey' => $public], JSON_UNESCAPED_SLASHES);
