WOL 호환 API 경로 추가

This commit is contained in:
seo
2026-07-22 01:17:45 +09:00
parent ae7081bd94
commit b7534d8824
2 changed files with 20 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
<?php
declare(strict_types=1);
$action = $_GET['action'] ?? $_POST['action'] ?? '';
if (!in_array($action, ['wake_lan', 'wake_lan_status'], true)) {
http_response_code(404);
header('Content-Type: application/json; charset=utf-8');
header('Cache-Control: no-store');
echo json_encode([
'ok' => false,
'error' => 'unknown_action',
], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
exit;
}
require __DIR__ . '/../control/public/api.php';