diff --git a/license_manager/index.php b/license_manager/index.php index 3335b25..0966cd6 100644 --- a/license_manager/index.php +++ b/license_manager/index.php @@ -18,13 +18,13 @@ if (strpos($request_uri, '/verify') !== false) $endpoint = 'verify'; if (strpos($request_uri, '/deactivate') !== false) $endpoint = 'deactivate'; if (strpos($request_uri, '/issue') !== false) $endpoint = 'issue'; +$input = json_decode(file_get_contents('php://input'), true); + // If running as a simple script without proper URL rewriting if (empty($endpoint)) { - $endpoint = $_GET['action'] ?? ''; + $endpoint = $_GET['action'] ?? $input['action'] ?? ''; } -$input = json_decode(file_get_contents('php://input'), true); - try { $pdo = db_manager(); } catch (Exception $e) {