85ab829805
Status page and JSON API read from private/data; root index.php stays a placeholder. Mark todo 06 done. Co-authored-by: Cursor <cursoragent@cursor.com>
19 lines
477 B
PHP
19 lines
477 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
$root = dirname(dirname(__DIR__));
|
|
$configDir = is_dir($root . '/private/config')
|
|
? $root . '/private/config'
|
|
: $root . '/config';
|
|
|
|
require_once $configDir . '/status-view.php';
|
|
|
|
$status = formatPublicStatus(loadStatusSnapshot());
|
|
|
|
header('Content-Type: application/json; charset=utf-8');
|
|
header('X-Robots-Tag: noindex');
|
|
header('Cache-Control: no-store');
|
|
|
|
echo json_encode($status, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\n";
|