movmaker-webui/push_config.php
2026-05-26 15:48:30 +02:00

11 lines
382 B
PHP

<?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);