<?php declare(strict_types=1); if (!defined('DASHBOARD_ROOT')) { http_response_code(403); exit; } header('Content-Type: application/json'); if ($_SERVER['REQUEST_METHOD'] !== 'POST') { http_response_code(405); exit(json_encode(['ok' => false, 'error' => 'POST required'])); } if (!AuthChain::isAuthenticated()) { http_response_code(401); exit(json_encode(['ok' => false, 'error' => 'Unauthorized'])); } CSRF::enforce(); require_once '/var/www/shared/status_codes.php';