14 lines
512 B
PHP
14 lines
512 B
PHP
<?php
|
|
// /var/www/html/api/screens-health.php
|
|
// Sert screens-health.json avec CORS + cache court. Zero regression.
|
|
header("Content-Type: application/json; charset=utf-8");
|
|
header("Access-Control-Allow-Origin: *");
|
|
header("Cache-Control: public, max-age=30");
|
|
$file = __DIR__ . "/screens-health.json";
|
|
if (!file_exists($file)) {
|
|
http_response_code(404);
|
|
echo json_encode(["error" => "health_not_yet_generated", "hint" => "cron will populate /api/screens-health.json soon"]);
|
|
exit;
|
|
}
|
|
readfile($file);
|