19 lines
554 B
PHP
19 lines
554 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
/**
|
|
* Kleiner, öffentlicher Erreichbarkeitstest für die DeskHub-API.
|
|
* Gibt keine internen Details oder Zugangsdaten zurück.
|
|
*/
|
|
require_once __DIR__ . '/../../../includes/bootstrap.php';
|
|
|
|
header('Content-Type: application/json; charset=utf-8');
|
|
header('Cache-Control: no-store');
|
|
|
|
try {
|
|
get_db()->query('SELECT 1');
|
|
echo json_encode(['status' => 'ok'], JSON_UNESCAPED_UNICODE);
|
|
} catch (Throwable $e) {
|
|
http_response_code(503);
|
|
echo json_encode(['status' => 'unavailable'], JSON_UNESCAPED_UNICODE);
|
|
}
|